Asked By – Alex Gordon
I am running this:
import csv import sys reader = csv.reader(open(sys.argv, "rb")) for row in reader: print row
And I get this in response:
['import csv'] ['import sys'] ['reader = csv.reader(open(sys.argv', ' "rb"))'] ['for row in reader:'] [' print row'] >>>
sys.argv I would like it to prompt me to enter a filename.
How do I get it to prompt me to enter a filename?
Now we will see solution for issue: Getting user input [duplicate]
In python 3.x, use
input() instead of