title: how to append item to a global list from within a procedure
body: <p>I get a syntax error when i do this:</p>
  
  <pre><code>p = []
  def proc(n):
      for i in range(0,n):
          C = i
          global p.append(C)
  </code></pre>