title: Passing variables when invoking a Python script
body: <p>Is it possible to pass variables to Python when invoking a script from a bash shell?</p>
  
  <p>For example, when I would call my_script in the shell like this:</p>
  
  <pre><code>python my_script.py -par1 -par2
  </code></pre>
  
  <p>is it possible to use <code>par1</code> and <code>par2</code> as variables in Python so I can pass them as arguments to a function?</p>
  
  <p>Something similar like for shell scripting, where in something like this:</p>
  
  <pre><code>my_script.sh par1
  </code></pre>
  
  <p><code>par1</code> would be stored as $1</p>