Is there a straight forward way to add a list to a dictionary?
For example
a = [1,2,3]
d = dict(a)
I have seen a way (I do not remember exactly how) that add a list to a dictionary making the name of the list as key and list's values as values in the dictionary, something like this:
a = [1,2,3]
d = somefunction(a)
print(d)
Output:
{'a':[1,2,3]}