Skip to content

Instantly share code, notes, and snippets.

@athursto
Created August 15, 2023 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save athursto/d0615ebb31bf198f538e1df70af709cf to your computer and use it in GitHub Desktop.
Save athursto/d0615ebb31bf198f538e1df70af709cf to your computer and use it in GitHub Desktop.
solution815.py
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