We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Strings
- The Minion Game
- Discussions
The Minion Game
The Minion Game
Sort by
recency
|
1298 Discussions
|
Please Login in order to post a comment
Use a set to search for vowels, O(1) instead of O(n), n = |vowels| Also single loop instead of two loops i.e. list comprehensions.
Cleaner solution:
def minion_game(string): vowels='AEIOU' kevin_score=0 stuart_score=0 length=len(string)