I am looking to convert the a list of 2-element lists to a dictionary. Note that I do not want to use group_by that has different outcomes than a simple conversion to dict. Is this possible? The two most obvious ways to try it out are not supported:
d = { x for x in [[1,2],[3,4]]}
Which gives us:
TypeError: unhashable type: 'list'
d = { *x for x in [[1,2],[3,4]]}
Which results in :
SyntaxError: iterable unpacking cannot be used in comprehension