title: How can I use sys.argv in Python
body: <p>I am runnung this code from a paper:</p>
  
  <pre><code>import sys
  fi = open(sys.argv[1])
  output_feature = open(sys.argv[2],"w")
  output_group = open(sys.argv[3],"w")
  </code></pre>
  
  <p>When I run this code in <code>Colab</code> I face this error:</p>
  
  <blockquote>
    <p>IOError: [Errno 2] No such file or directory: '-f'</p>
  </blockquote>
  
  <p>and if I run the code in <code>mac Os</code> I face this error:</p>
  
  <blockquote>
    <p>IndexError: list index out of range</p>
  </blockquote>
  
  <p>How can I solve this problem?</p>