anonandmore

simple code that takes the vowels out of sentence entered

Apr 1st, 2016
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. message = input("Enter a message: ")
  2. new_message = ""
  3. VOWELS = "aeiou"
  4.  
  5. print()
  6. for letter in message:
  7. if letter.lower() not in VOWELS:
  8. new_message += letter
  9. print("A new string has been created:", new_message)
  10. print("\nYour message without vowels is:", new_message)
  11. input("\n\nPress the enter key to exit.")
Advertisement
Add Comment
Please, Sign In to add comment