Explaining appearent idiosyncrasy in Python when using tuples as elements in a set
Explaining appearent idiosyncrasy in Python when using tuples as elements in a set Question: If we execute the two following lines in Python: a = (1,) {a} it won’t cause any problems. Instead, if we execute the two following lines: a = ([1],) {a} now what we get is "TypeError: unhashable type: ‘list’". In both …