Dictionary: create a new list of keys
d2 = {'spam': 2, 'ham': 1, 'eggs': 3} # make a dictionary print d2 # order is scrambled print d2.keys() # create a new list of my keys
1. | Use variable as a key | ||
2. | For loop through the dictionary keys | ||
3. | Dictionary: The keys, values, and items Functions | ||
4. | Sorting Keys: for Loops | ||
5. | Dictionary Keys Are Case-Sensitive |