Command Line Arguments In Python
Question: I am originally a C programmer. I have seen numerous tricks and "hacks" to
read many different arguments.

What are some of the ways Python programmers can do this?

### Related

  * [What’s the best way to grab/parse command line arguments passed to a Python script?](http://stackoverflow.com/questions/20063/whats-the-best-way-to-grab-parse-command-line-arguments-passed-to-a-python-scrip)
  * [Implementing a “[command] [action] [parameter]” style command-line interfaces?](http://stackoverflow.com/questions/362426/implementing-a-command-action-parameter-style-command-line-interfaces)
  * [How can I process command line arguments in Python?](http://stackoverflow.com/questions/567879/how-can-i-process-command-line-arguments-in-python)
  * [How do I format positional argument help using Python’s optparse?](http://stackoverflow.com/questions/642648/how-do-i-format-positional-argument-help-using-pythons-optparse)


Answer: 
    import sys
    
    print "\n".join(sys.argv)
    

`sys.argv` is a list that contains all the arguments passed to the script on
the command line.

Basically,

    
    
    import sys
    print sys.argv[1:]
    

