I have two tuples a = (('1',), ('2',), ('3',),)
and b = (('1',), ('3',),)
. I need to get the result as (('2',),)
since, 2 is the element that is present in a
and not in b
.
I referred this Find intersection of two lists? and Is there a way to get the difference and intersection of tuples or lists in Python? for getting an idea, but these are for lists and not for tuples. I am not able to use intersection() for tuples.
Is there a way I can get a-b
in python tuples?