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

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

07 July 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'] #

07 July 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 July 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.