How to add multiple values of same key in python dictionary

后端 未结 0 1074
忘掉有多难
忘掉有多难 2020-12-04 01:30

I have dictionary like this.

dict1 = {\'key1\': [1,2,3,4] , \'key2\': [5,6,7]}

I want output like this.

dict1 = {\'key1\': 10          


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