title: Python string manipulation using a dictionary
body: <p>I'm working on a problem given to us by our professor and I can't get it to work how I want it to work. I should preface this by saying I'm a beginner with Python.</p>
  <p>Essentially I'm to write a function that given a string returns the same string as a list with the objects of the list being different versions of the given string.</p>
  <p>For example: Hello should return;</p>
  <pre><code>Hello
  hEllo
  heLlo
  helLo
  hellO
  </code></pre>
  <p>However we aren't allowed to use python's built in functions that can determine whether a character is upper or lower case such as upper() or lower() and having only really done any &quot;programming&quot; in MatLab prior to this and some OpenCV I'm looking for some help with getting started.</p>
  <p>What I've tried so far is something like this:</p>
  <pre><code>def randRetur(menBok,dicT):
      menBok = list(menBok)
      for i,j in enumerate(menBok):
          if menBok[i] in dicT.values():
              scrambledPws.append(menBok)
          else:
              scrambledPws.append(dicT[j])
      return scrambledPws
  </code></pre>
  <p>where my Dictionary maps lowercase letters to uppercase and scrambledPws is simply an empty list to start off with.</p>
  <p>However this doesn't quite give me what I want but rather everything is capitalized in the first object of the list, which is where my understanding of how pythons handling of a for loop is very different to me from how for example MatLab handles it. I'm therefore more hoping for some guidance rather than how to do it, as I'm trying to learn.</p>