I have multiple lists of tuples eg
[([1, 2, 3, 4], 2), ([5, 6, 7], 3)]
that I would like to have as keys to a dictionary (so each key in my dic
Use tuples instead.
>>> dict((tuple(x[0]), x[1]) for x in [([1,2,3,4],2),([5,6,7],3)]) {(5, 6, 7): 3, (1, 2, 3, 4): 2}