Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def missing_letters(user_str):
- """
- This function takes string as argument and prints out the missing letters.
- """
- ht = histogram(user_str) # Calling the histogram function as a requirement.
- ml = sorted(list(set(alphabet).difference(set(user_str))))
- if not ml:
- return f"{user_str} contains all letters."
- else:
- return f'{"".join(ml)} {"is" if len(ml) == 1 else "are"} missing'
- for test in test_dups:
- print(f"In {test}, {missing_letters(test)}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement