Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def string_input():
- good_value = ''
- while (good_value.isalpha() == False):
- print("Please enter a string, letters A-Z only.")
- print("Numbers, special characters and spaces will be rejected.")
- good_value = input()
- return good_value.lower()
- string = string_input()
- alphabet = [
- 'a','b','c','d','e','f','g','h','i','j','k','l','m',
- 'n','o','p','q','r','s','t','u','v','w','x','y','z'
- ]
- for i in range (len(alphabet)):
- print(alphabet[i], ': ', string.count(alphabet[i]), sep='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement