Divide the values of two dictionaries in python

后端 未结 4 1274
离开以前
离开以前 2020-12-16 02:34

I have two dictionaries with the same keys and I would like to do division on the values to update or create a new dictionary, keeping the keys intact, with the quotient as

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 03:21

    in 3.2 you use the .keys() method and the .get(key). http://www.tutorialspoint.com/python/python_dictionary.htm

提交回复
热议问题