Finding key from value in Python dictionary:

前端 未结 4 1978
误落风尘
误落风尘 2020-12-06 10:53

Fairly new to Python, still struggling with so much information.

All the documentation I\'ve seen about dictionaries explain various ways of getting a value via a k

4条回答
  •  时光取名叫无心
    2020-12-06 11:36

    Building a opposite dictionary is not at all good manner as one or more key have same value but if you invert it you need to insert key:[value1,... ] structure which will lead you to another problem.

提交回复
热议问题