title: Python error (list index out of range)
body: <p>I am having an issue with the following section of Python code:</p>
  
  <pre><code>def main():
  file_name = sys.argv[1]
  file = open(file_name, 'r')
  l = []
  for line in file:
      if (len(l) == 4):
          res = valid_data(l)
          if (res == False):
              print("The Data is InValid")
          else:
              print_data(l)
          l = []
      else:
          l.append(line.strip())
  if (l != []):
      res = valid_data(l)
      if (res == False):
          print("The Data is InValid")
      else:
          print_data(l)
  main()
  </code></pre>
  
  <p>Specifically, the error is as follows:</p>
  
  <pre><code> Traceback (most recent call last):
  
  
  File "C:\Users\Desktop\44.py", line 194, in &lt;module&gt;
  main()
  
  
  
   File "C:\Users\Desktop\44.py", line 173, in main
  information = sys.argv[1]
  IndexError: list index out of range
  </code></pre>
  
  <p>The sys.argv might require an argument at the command line when running the script, but I'm not sure what the issue might be! </p>