Letter counts
Write letter_counts(text) that returns a dictionary mapping each
character in text to how many times it appears, ignoring spaces.
letter_counts("a bad cab") -> {"a": 3, "b": 2, "d": 1, "c": 1}
def letter_counts(text):
...
Write letter_counts(text) that returns a dictionary mapping each
character in text to how many times it appears, ignoring spaces.
letter_counts("a bad cab") -> {"a": 3, "b": 2, "d": 1, "c": 1}
def letter_counts(text):
...