title: How to append two strings in Python?
body: <p>I have done this operation millions of times, just using the <code>+</code> operator! I have no idea why  it is not working this time, it is overwriting the first part of the string with the new one! I have a list of strings and just want to concatenate them in one single string! If I run the program from Eclipse it works, from the command-line it doesn't!
  The list is:</p>
  
  <pre><code>["UNH+1+XYZ:08:2:1A+%CONVID%'&amp;\r", "ORG+1A+77499505:ABC+++A+FR:EUR++123+1A'&amp;\r", "DUM'&amp;\r"]
  </code></pre>
  
  <p>I want to discard the first and the last elements, the code is:</p>
  
  <pre><code>        ediMsg = ""
          count = 1
          print "extract_the_info, lineList ",lineList
          print "extract_the_info, len(lineList) ",len(lineList)
          while (count &lt; (len(lineList)-1)):
              temp = ""
  #            ediMsg = ediMsg+str(lineList[count])
  #            print "Count "+str(count)+" ediMsg ",ediMsg 
              print "line value : ",lineList[count]
              temp = lineList[count]
              ediMsg += " "+temp
              print "ediMsg     : ",ediMsg
              count += 1
              print "count ",count
  </code></pre>
  
  <p>Look at the output:</p>
  
  <pre><code>extract_the_info, lineList  ["UNH+1+XYZ:08:2:1A+%CONVID%'&amp;\r", "ORG+1A+77499505:ABC+++A+FR:EUR++123+1A'&amp;\r", "DUM'&amp;\r"]
  extract_the_info, len(lineList)  8
  line value :  ORG+1A+77499505:ABC+++A+FR:EUR++123+1A'&amp;
  ediMsg     :  ORG+1A+77499505:ABC+++A+FR:EUR++123+1A'&amp;
  count  2
  
  line value :  DUM'&amp;
   DUM'&amp;     :  ORG+1A+77499505:ABC+++A+FR:EUR++123+1A'&amp;
  count  3
  </code></pre>
  
  <p>Why is it doing so!?</p>