A list finds things by position. A dictionary finds them by a key you choose, like a word in a real dictionary. It's written with curly brackets and pairs of key: value.
Setting d[key] = value adds the key if it's new, or replaces its value if it's already there; each key appears only once. Asking for a key that isn't there is a KeyError. To be safe, check with key in d first, or use d.get(key, default), which gives the default instead of an error.
Dictionaries are perfect for counting. Go through the items and add 1 to each one's count, starting it at 0 the first time.
counts = {}
for letter in "banana":
counts[letter] = counts.get(letter, 0) + 1
print(counts)
Prints
{'b': 1, 'a': 3, 'n': 2}
To go through a dictionary, for key in d gives the keys, and for key, value in d.items() gives both. Keys are usually strings or numbers; values can be anything, even lists or other dictionaries.