title: Appending to the list outside function in python not changing the list
body: <pre><code>lst_val = []
  def func():
      for value in any_list:
          global lst_val 
          lst_val .append(value)  
  </code></pre>
  <p>I'm using the above code to append values to a list outside of function. But, it is still showing as empty list. How can I modify the list within a function?</p>