CH 12 Dictionaries Flashcards
1
Q
dictionary
A
an unordered collection of key-value pairs
2
Q
dot notation
A
used by modules, dictionaries, lists, and strings. The method is called to the right of the object on which it is applied. Like:
name = “John”
print(name.lower())
john
or todo = {“stuff” : 5 , “things”:6}
todoKeys = list( todo.keys() )
print(todoKeys)
3
Q
mutable
A
can be altered. lists, dictionaries, and sets all fall into this category. Tuples are immutable. As are strings, integers, and floats. And probably a slew of others which I simply don’t understand at this moment.