Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def validWord(word):
- validChars = ["a", "e", "i", "o", "u", "p", "k", "\'"]
- for idx, i in enumerate(word):
- if i in validChars:
- return True
- else:
- return False
- if __name__ == "__main__":
- print(validWord('Hawai\'ian Pineapple'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement