title: How exactly is this code working to reverse a string in Python
body: <pre class="lang-py prettyprint-override"><code>def reverse(x):
      output = ""
      for c in x:
          output = c + output
  
      return output
  
  print(reverse("Hello"))
  </code></pre>
  
  <p>This code works fine to reverse a string in Python, I just can't seem to understand why it is working and how.</p>
  
  <p>If, for example, I iterate through a string, usually it will iterate and print starting from "H" and work its way down to "O." How is it that here, it's going backwards?</p>