MiktheFrik
Coder
Initially, I was trying to find a way to compare "word" and "vowels" for "i" and take that same I and replace it with the index in vowels2 since they're the same length. Here is the assignment directions --
Python:
#vowels = ("a", "e", "i", "o", "u")
#vowels2 = ("á", "é", "í", "ó", "ú")
vowels = ("a", "á", "e", "é", "i", "í", "o", "ó", "u", "ú")
def convert():
word = input("Please enter a word: ")
word = list(word)
for i in range(len(word)):
if (word[i] == vowels):
del word[0] # just using this to find if the statement is true
word = ''.join(word)
print(word)
#use dictionary maybe
if __name__ == '__main__':
convert()
#You have to convert it to a list. To convert a string str into a list, use the command list(str).
# To convert it back into a string, use the command word = ''.join(ls).
#á, é, í, ó, and ú