i have a dynamic group: for example we have a list with 20 items in it in this time.... i wanna make this list in 4 individual list with 5 items something like this is in my head..
a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
z = len(a)/4
b = []
for i in range(z)
and after i don't know what i should do.......
i did something like this but it's completely wrong:
for i in range(len(a)):
for j in range(z):
b.append(a)
this is my codes:
import maya.cmds as cm
import random as random
myList = cm.ls(sl = True)
random.shuffle(myList)
b = [myList[i:i+5] for i in range(0, len(myList), 5)]
for i in b:
print str(i)+".v"
the result is:
[u'curve13', u'curve26', u'curve5', u'curve40', u'curve17'].v
but i need:
[u'curve13.v', u'curve26.v', u'curve5.v', u'curve40.v', u'curve17.v'].v