I'm trying to convert a list to a dictionary by using the dict function.
inpu = input.split(",")
dic = dict(inpu)
The above code is trying to get a string and split it on ',' and afterwards I use the dict function to convert the list to a dictionary.
However, I get this error:
ValueError: dictionary update sequence element #0 has length 6; 2 is required
Can anybody help?
setinstead ofdict.