Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("A nice little word counter that does not use the \"len()\" function")
- phrase = input("Word: ")
- letter_count = sum(1 for _ in phrase)
- print(f"Letters counted: {letter_count}")
- input("Press <enter> to exit...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement