title: How to pass sys.argv[n] into a function in Python
body: <p>I am trying to pass "sys.argv[1]" into a function.</p>
  
  <pre><code>#!/usr/bin/env/ python
  import sys
  def main():
      test(sys.argv[1])
  def test(sys.argv[1]):
      print "Hello " + sys.argv[1]
  
  ./arg.py World
  
  File "./arg.py", line 5
  def test(sys.argv[1]):
              ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Not sure where to go from here after scowering the Interwebs for a few hours. I have also tried to set the "sys.argv[1]" to a variable and tried passing that into the function and still no avail.</p>