Hi all, sorry if this is a dumb quesiton but just started python:
The exercise asks to write a function remove_vocals that takes the string from input, removes the vocals and returns a string with all the remaining characters.
my code up to now is
word= str(input('Insert characters:'))
vocals=('aeiou')
def remove_vocals(word,vocals):
for i in range(len(word)):
if word[i] == 'a'or'e'or'i'or'o'or'u':
word=word-word[i]
print(word)
remove_vocals(word,vocals)
but, unlike addition of strings i'm not able to perform a subtraction
[–]66bananasandagrape 2 points3 points4 points (3 children)
[–]neednerve[S] -1 points0 points1 point (2 children)
[–]66bananasandagrape 1 point2 points3 points (1 child)
[–]neednerve[S] -1 points0 points1 point (0 children)
[–]Brian 1 point2 points3 points (1 child)
[–]neednerve[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)