If you can post an example where you show us the actual content of the two
list you are comparing, it will be much easier to help you find what might
be wrong.
Something like:
a = {1, 2, 3}
b = {2, 3, 4}print a - b # Remove items from a that exist in b#
1print b - a # Remove items in b that exists in a# 4print a ^ b #
Symmetrical difference between a and b# [1, 4]
All the operations can be found here:
https://docs.python.org/2/library/sets.html#set-objects
On 21 November 2014 08:14, likage <[email protected]> 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 [email protected].
> 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.
>
--
*Marcus Ottosson*
[email protected]
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAVkoOMFUVJavN-BzGgmNVj%3D%2B83W26JXU0LCQadOgpBsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.