title: Python List help: TypeError: cannot concatenate 'str' and 'list' objects
body: <p>I am making a list for the main desktop to read what icons are executable and which are not. I keep getting the error:
  TypeError: cannot concatenate 'str' and 'list' objects</p>
  
  <p>Here is a sample of the code:
  and yes I have tried EVERYTHING and it just doesn't want to work.</p>
  
  <pre><code>    list0 = ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
      for filee in fls:
          if filee.endswith(".jex"):
              jkjk = filee
              icon = os.listdir("/Users/"+getpass.getuser()+"/Desktop/"+jkjk+"/Files/Icon")
              for anything in icon:
                  if anything.endswith(".png"):
                      fttts = pygame.image.load("/Users/"+getpass.getuser()+"/Desktop/"+jkjk+"/Files/Icon/"+anything)
                      fttts = pygame.transform.scale(fttts, (48, 48))
                      screen.blit(fttts, (15+aaas, 295+fasdd))
                      print("aaas = "+str(aaas))
                      print("fasdd = "+str(fasdd))
                      fasdd = fasdd + 45
  
                      if fasdd &gt;= winy-295-63:
                          aaas = aaas + 63
                          fasdd = -280
              jkjk = jkjk+"/Files/Executable"
              jkjk = os.listdir("/Users/"+getpass.getuser()+"/Desktop/"+jkjk)
              for exfilepy in jkjk:
                  if exfilepy.endswith(".py"):
                      for o in os.listdir("/Users/"+getpass.getuser()+"/Desktop/"+jkjk+execfilepy):
                          ftttThis[o] = [str(os.listdir("/Users/"+getpass.getuser()+"/Desktop/"+jkjk+execfilepy)[o])]
                      for i in list0:
                          list0[i] = ftttThis[i]
  </code></pre>
  
  <p>.jex is a custom extension and is not causing the problem. it is the list.</p>
  
  <p>Output:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/kf9z/Desktop/JupeeGUIFiles 2/JUPEE_GUI_WINDOWS copy.py", line 750, in &lt;module&gt;
      top().top()
    File "/Users/kf9z/Desktop/JupeeGUIFiles 2/JUPEE_GUI_WINDOWS copy.py", line 418, in top
      lock().locked()
    File "/Users/kf9z/Desktop/JupeeGUIFiles 2/JUPEE_GUI_WINDOWS copy.py", line 338, in locked
      lock().unlocked()
    File "/Users/kf9z/Desktop/JupeeGUIFiles 2/JUPEE_GUI_WINDOWS copy.py", line 410, in unlocked
      setup().setdesk()
    File "/Users/kf9z/Desktop/JupeeGUIFiles 2/JUPEE_GUI_WINDOWS copy.py", line 191, in setdesk
      for o in os.listdir("/Users/"+getpass.getuser()+"/Desktop/"+jkjk+execfilepy):
  TypeError: cannot concatenate 'str' and 'list' objects
  </code></pre>
  
  <p>This is Python 2.7 (or 2.x)</p>