title: Difference Between " " and [ ] in Python
body: <p>I have written a simple program to reverse a string but I am getting different result with i write <code>a = ""</code> and when I write <code>a = []</code>. Please can someone help me explain why this happens:</p>
  
  <p>Input is: </p>
  
  <pre><code>"Argument goes here"
  </code></pre>
  
  <p><strong>1st way</strong></p>
  
  <pre><code> a= []
   for i in range(( len(text)-1,-1,-1):
     a+= text[i]  
   return a
  </code></pre>
  
  <p>Output is: <code>['e', 'r', 'e', 'h', ' ', 's', 'e', 'o', 'g', ' ', 't', 'n', 'e', 'm', 'u', 'g', 'r', 'A']</code></p>
  
  <p><strong>2nd way</strong> </p>
  
  <pre><code>a = ""
  for i in range(1, len(text) + 1):
      a += text[len(text) - i]  
  return a
  </code></pre>
  
  <p>Output is: <code>ereh seog tnemugrA</code></p>