Why Your Python Tuple Can't Be a Dictionary Key
"Tuples are immutable" is one of the first things you learn about Python tuples.
But check this out:
>>> t = ([1, 2], [3, 4]) # Tuple of lists
>>> t[0].append(99) # Modify the list inside
>>> t
([1, 2, 99], [3, 4]) # It changed!
Wait—di...
samuelochaba.hashnode.dev2 min read