Characters.get('e', 0) tells python to search for The real key 'e' in the dictionary. If it's actually not discovered it returns 0. Because This really is The 1st time 'e' is passed from the loop, the character 'e' is just not present in the dictionary still, Hence the get method https://israelvsldt.blogzet.com/detailed-notes-on-caribo-edibles-51131065