Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. def validWord(word):
  2. validChars = ["a", "e", "i", "o", "u", "p", "k", "\'"]
  3. for idx, i in enumerate(word):
  4. if i in validChars:
  5. return True
  6. else:
  7. return False
  8.  
  9. if __name__ == "__main__":
  10. print(validWord('Hawai\'ian Pineapple'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement