Hi Team,
Iam getting the below error while iam creating thedictionary object , any help is really appreciated
Case 1 : Trying to create a tuple and using the tuple trying to create a dictionary
>>> t=(1,2),
>>> d=dict(t)
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
d=dict(t)
TypeError: cannot convert dictionary update sequence element #0 to a sequence
Case 2: Trying to create a list and using the list creating a dictionary
>>> l=[1,2,3,4]
>>> d=dict(l)
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
d=dict(l)
TypeError: cannot convert dictionary update sequence element #0 to a sequence
Our community of experts have been thoroughly vetted for their expertise and industry experience.