1

How is the code below possible?

>>> frozenset(('a_')) == frozenset(['a_'])
False
>>> frozenset(('a')) == frozenset(['a'])
True

My understanding is that so long as each each element of the iterable is hashable, a frozen set will be instantiated with each element being an element of the given iterable. I expect that both expressions above should return True.

Dipen Gajjar
  • 888
  • 10
  • 20
Greg
  • 133
  • 1
  • 8

0 Answers0