CGTalk > Software > Autodesk Maya > Maya Programming
Login register
reply share thread « Previous Thread | Next Thread »
Thread Tools Search this Thread Display Modes
Old 08-28-2014, 04:02 PM   #16
kiryha's Avatar
Kiryha Krysko
3D artist
Join Date: Nov 2002
Posts: 702
Send a message via ICQ to kiryha
Well... list comprehensions is also way to go?

nums = [1,2,3] fruit = ["Apples", "Peaches", "Pears", "Bananas"] print [(i,f) for i in nums for f in fruit]

[(1, 'Apples'), (1, 'Peaches'), (1, 'Pears'), (1, 'Bananas'),
(2, 'Apples'), (2, 'Peaches'), (2, 'Pears'), (2, 'Bananas'),
(3, 'Apples'), (3, 'Peaches'), (3, 'Pears'), (3, 'Bananas')]
3D animation blog
reply share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:31 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.