Created
August 15, 2023 16:51
-
-
Save athursto/d0615ebb31bf198f538e1df70af709cf to your computer and use it in GitHub Desktop.
solution815.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def faulty_keyboard(string): | |
vowel_list = ["a", "e", "i", "o", "u", "y"] | |
substring = "" | |
for char in string: | |
print(f"evaluating.... {char}") | |
if char in vowel_list: | |
substring = substring[::-1] | |
print(f"reversing.... substring is now {substring}") | |
else: | |
substring = substring + char | |
print(f" substring is now {substring}") | |
return substring | |
print(faulty_keyboard("alison")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment