result=set() result.add(1) result.add(True) result.add('Science') print(result)Result returned:
{1, 'P'}
I am adding the values 1 & True to the set and set does not consider True. I am assuming that this is happening because True=1 and set does not allow duplicates.
Is this behavior right?
In my case 1 is an int and True is a bool.