I was trying to update a dictionary using list values as (key , value) pairs. But it does not update and throws a TypeError

后端 未结 0 1958
日久生厌
日久生厌 2020-12-12 18:11

user_dict = {"bob" : 30, "john": 40} user_dict.update(["phill", 50]) print(user_dict)

ValueError: dictionary update sequence element #0

相关标签:
回答
  • 消灭零回复
提交回复
热议问题