title: Appending elements to empty list in python
body: <p>I have two functions shown here. <code>for_coordinates_outside_nest(tag_coord)</code> and <code>defining_polygon_outside_nest(tag_data)</code>. What i am trying to do here is, if the functions returns True, i would like to append the numbers returned by the function to <code>ants_inroi_outsidenest</code>. The code works fine. But when i try to print <code>ants_inroi_outsidenest</code>, i am getting :</p>
  
  <p><code>this-[971]
  this-[971, 977]
  this-[971, 977, 728]
  this-[971, 977, 728, 740]</code></p>
  
  <p>What i want is a single list <code>this-[971,977,728,740]</code>. Any suggestions will be heavily appreciated.</p>
  
  <pre><code>def for_coordinates_outside_nest(tag_coord):
      poly = [1000,2100,80,1900]  
      bbPath = mplPath.Path(np.array([[poly[0],poly[1]],[poly[3],poly[1]],[poly[3],poly[2]],[poly[0],poly[2]]]))
      if bbPath.contains_point((tag_coord)):
         return True
      else:
         return False
  
  def defining_polygon_outside_nest(tag_data):
      ants_in_arena = []
      ants_inroi_outsidenest = []
      for id, (x,y) in tag_data:
          ants_in_arena.append(id)
          if for_coordinates_outside_nest((x,y)) is True:
              ants_inroi_outsidenest.append(id)
              print "this-" + str(ants_inroi_outsidenest)
      return ants_inroi_outsidenest
  </code></pre>