Mar-22-2017, 10:13 AM
(Mar-22-2017, 09:44 AM)zivoni Wrote: List comprehension is more universal, as sets work only with hashable items. Sometimes one could be bitten with a fact that immutability doesnt guarantee hashability (usually with tuples - while (1, [2]) is tuple and therefore immutable, it is not hashable).
Good point regarding hashability of elements of the set