title: Swapping letter casing in Python
body: <p>Been trying to transition from Java to Python but I am having difficulty writing for loops that iterate through a string.<br>
  As you can see, I tried accessing each index to check its case. If that letter is capital then we lowercase it and vice versa.<br>
  I'm not really sure why it is returning an unchanged string if I am already making changes to that particular index</p>
  
  <pre><code>def swap_case(s):
  
      for x in range(len(s)):
          if s[x].isupper():
              s[x].lower() 
          if s[x].islower():
              s[x].upper()
  
      return s
  </code></pre>