title: Interpreter skips part of code in sys.argv
body: <p>I have code in an if statement which checks if an argv was passed in the command line, however I have a part of code which should run if none argument was passed by the user (just the file name). Interpreter instead of running that code, instantly jumps to the code which should run if an argv was typed be the user and prints an IndexError: list index out of range.</p>
  
  <pre><code>import sys
  if sys.argv[1] == '--list':
      do sth
  elif sys.argv[1] == '--remove':
      do sth
  else: (Which I thought will be ran with no arguments)
      this part of code is skipped no matter what
  </code></pre>
  
  <p>How to make interpreter to run code in else statement if none argument was typed?</p>