PDA

View Full Version : myList = list(set(myList))


Stellios
07-19-2012, 09:36 PM
myList = list(set(myList)) doesnt work in maya, why?

NaughtyNathan
07-19-2012, 10:13 PM
works fine for me, assuming myList is an sequence to start with.
myList = [ 'a','b','a','c','d' ]
myList = list(set(myList))
# Result: ['a', 'c', 'b', 'd'] #

NateH
07-20-2012, 07:47 PM
Make sure you didn't assign anything to the "list" or "set" names... Python has a few generic default functions that people tend to overwrite by mistake (list, set, min, max, map, str, int, etc...)

CGTalk Moderation
07-20-2012, 07:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.