title: How can I change the case in Python to make upper case lower and vice versa
body: <p>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.</p>
  
  <p>Examples</p>
  
  <pre><code>&gt;&gt;&gt; changeCase('aPPle')
  "AppLE"
  &gt;&gt;&gt; changeCase('BaNaNa')
  'bAnAnA'
  </code></pre>
  
  <p>I am a beginner in python where is my error ?</p>
  
  <pre><code>def changeCase(word):
      return ''.join(c.upper() if c in 'aeiou' else c.lower() for c in word)
  </code></pre>