Topic 7: Question 4 Write the function changeCase(word) that changes the case of all the letters in a word and returns the new word.
Examples
>>> changeCase('aPPle')
"AppLE"
>>> changeCase('BaNaNa')
'bAnAnA'
I am a beginner in python where is my error ?
def changeCase(word):
return ''.join(c.upper() if c in 'aeiou' else c.lower() for c in word)