Python: Perform an operation on each dictionary value

后端 未结 4 482
终归单人心
终归单人心 2020-12-09 07:54

In python 2.6 I want to perform an operation on each dictionary value, for example, I want to multiply by 2 for each of them. How to code less for this task?

4条回答
提交回复
热议问题