A program counts the letters of a word in a dictionary, and then asks the dictionary three things. word = "abca" count = {} for ch in word: count[ch] = count.get(ch, 0) + 1 print(count, len(count), count.get("z")) What does the program print?
Log in to join the discussion.
Loading…