joelgrus / data-science-from-scratch

code for Data Science From Scratch book
MIT License
8.63k stars 4.5k forks source link

sys.argv index is out of range #78

Closed smithjackson35 closed 5 years ago

smithjackson35 commented 5 years ago

pg. 111 - stdin and stdout

I am trying to construct the egrep.py file but when trying to set the regex variable = sys.argv[1] I get the error below

IndexError: list index out of range

smithjackson35 commented 5 years ago

This issue was resolved when I typed the script into the editor and ran it from the command line.