title: How to access list/dictionary in a function from a different function
body: <p>I'm new to python and I was wondering if there's a way for me to access a list or dictionary with data already stored in it from a different function. </p>
  
  <p>I was wondering if there's a way for me to make the list global so I can access it outside the function, or any other alternative solution. </p>
  
  <pre><code>def upload():
      numlist = [1,2,3,4]
  
  def add():
     for i in numlist:
         print(i)
  </code></pre>