I'm not getting any issues getting the different even with sets of mixed
unicode and ascii objects. Can you give a specific example that can
reproduce your error?

Also this can be a little bit easier to read:

a = set([u'male01', u'female01', u'elderly01'])
b = set([u'male01'])
a.difference(b)# {u'elderly01', u'female01'}

​

The operators are defined to map the methods of sets like union,
difference, intersection, ...



On Fri Nov 21 2014 at 9:14:14 PM likage <dissidia....@gmail.com> wrote:

> Hey Mark,
>
> Thanks for getting back to me. I am still not getting the results, seems
> to be the unicode error as I am appending the items into list.
> It works unless i took out the u in each of the list.. Is there any ways
> that I can take out the unicode or do I need to do some more splittings?
>
>
>
> On Friday, November 21, 2014 4:00:41 PM UTC+8, MarkJ wrote:
>>
>> Think what you're probably after is the difference call in sets, ie,
>> return the difference between the two sets
>>
>> diff2 = list(set(rigLs)^set(charLs))
>>
>> What the minus sign does is a return elements in the first arg that
>> aren't in the second, where as the ^ sign returns the actual difference.
>> That said with your lists I didn't get your results?
>>
>> hope that helps
>>
>> Mark
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/25f35623-6420-461f-8fad-1627b326861a%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/25f35623-6420-461f-8fad-1627b326861a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0-FrFeDYHPZ__qo4%3D5tASXkVU9_mJC1WcfU24anDbMyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to