I just started learning Python and I want to learn how to remove duplicate vowels in my input in a list (I am also sorry for my poor English skills).
so here's my code:
vowels = ['a', 'e', 'i', 'o', 'u']
word = input("Provide a word to search for vowel >> ")
found = []
for letter in word:
if letter in vowels:
found.append(letter)
for letter in found:
if found.count(letter) > 1:
found.remove(letter)
print(found)
If I typed, let's say, "aaaaa", the output is:
['a', 'a']
where it should only print:
['a']
how do I fix this code?
P.S. this is my first post in stackoverflow and I'd really appreciate anyone who tried to reach out. Thank you so much!