title: Python command line argument assign to a variable
body: <p>I have to either store the command line argument in a variable or assign a default value to it.</p>
  
  <p>What i am trying is the below</p>
  
  <pre><code>import sys
  Var=sys.argv[1] or "somevalue"
  </code></pre>
  
  <p>I am getting the error <strong>out of index</strong> if i don't specify any argument. How to solve this?</p>