title: 'NoneType' object has no attribute 'append' in python
body: <p>I have the following function in python:</p>
  
  <pre><code>def find_str(s, m):
      starting_points = find_starting_points(s,m)
      solution = []
      for i in range(0, len(starting_points)):
          position = starting_points[i]
          solution.append([position])
          solution = build_solution(position, s, m, solution)
      return solution
      pass
  </code></pre>
  
  <p>When I run the file in ipython, I get the following error:</p>
  
  <pre><code>     55     for i in range(0, len(starting_points)):
       56         position = starting_points[i]
  ---&gt; 57         solution.append([position])
       58         solution = build_solution(position, s, m, solution)
       59     return solution
  
  AttributeError: 'NoneType' object has no attribute 'append'
  </code></pre>
  
  <p>Why am I getting that error?</p>