title: Name is local and global syntax error in python
body: <p>I am getting error while executing below statement</p>
  
  <pre><code>a = 10
  
  def test_method(a):
      global a
      print("Old value of local a = " + str(a)) #this is returning "a = 10"
      a = 2
      print("New value of local a = " + str(a))
  
  test_method(a)
  print("Value of global a = " + str(a))
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>SyntaxError: name 'a' is local and global
  </code></pre>
  
  <p>How to change value of a globally in this proc where name is same for function argument and actual parameter</p>