Dictionaries: Methods
List of keys
Syntax: list.keys()
E.g.
>>> l = {'item':'tire','price':20.99}
>>> l.keys()
['item', 'price']
List of values
Syntax: list.values()
E.g.
>>> l.values()
['tire', 20.989999999999998]
Previous slide
Next slide
Back to first slide
View graphic version