📌  相关文章
📜  打印所有具有相同值的键 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:13.401000             🧑  作者: Mango

代码示例1
dict = {"Jim": "y", "Bob": "y", "Ravioli": "n"}
In [26]: [k for k,v in dict1.items() if v == 'y']
Out[26]: ['Bob', 'Jim']