How can I get a list of the values in a dict in Python?
(如何在Python中获取字典中的值列表?)
In Java, getting the values of a Map as a List is as easy as doing list = map.values();
(在Java中,将Map的值作为列表获取就像执行list = map.values();
一样容易list = map.values();
)
. (。)
I'm wondering if there is a similarly simple way in Python to get a list of values from a dict. (我想知道Python中是否有类似的简单方法可以从字典中获取值列表。)
ask by Muhd translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…