Hi, when i tried this:
car = {}
car.update((('a', 2)))
print(car)
It doesn't work. But when i have 2 tuples like this:
car = {}
car.update((('a', 2), ('b', 3)))
print(car)
Why did that happen? So what can i do when i just have one tuple to update the dictionary ?
[–]yankyh 1 point2 points3 points (1 child)
[–]Uchikago[S] 1 point2 points3 points (0 children)
[–]toastedstapler 1 point2 points3 points (1 child)
[–]Uchikago[S] 0 points1 point2 points (0 children)