title: Can't append values to list in python
body: <p>I'm trying to take values from a text file that I already have read into a seperate list, and I'm trying to find the specific location of each 'E' in the text file. Every time I print the list after using the following method, it comes up empty. I'm not sure what I'm doing wrong. AGENTS is a constant equal to 6</p>
  
  <pre><code>for a in range(0,2,1):
      agentLocations.append([])
      for c in range(0,AGENTS,1):
          indices = [(i,x) for i, x in enumerate(aMaze) if x == 'E']
          agentLocations[a].append(0)
          print(indices)
  </code></pre>
  
  <p>The code for getting the file into its own list is as follows:</p>
  
  <pre><code>for line in file:
      for char in line:
          for r in range (0, ROWS, 1):
              aMaze.append ([])
              aMaze[r].append(char)
      print ("".join(aMaze[ROWS-1]))
  </code></pre>
  
  <p>The file inputted looks like</p>
  
  <pre><code>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~H                           ~
  ~                            ~
  ~                            ~
  ~                            ~
  ~#                           ~
  ~                            ~
  ~                            ~
  ~        E                   ~
  ~                            ~
  ~                            ~
  ~                            ~
  ~               ##### #######~
  ~      E        #E           ~
  ~               #           E~
  ~               #   ES       ~
  ~               E            ~
  ~                            ~
  ~                            ~
  ################
  </code></pre>
  
  <p>And I am looking for the index locations of the 'E' characters in the list. </p>