(Oct-21-2019, 04:41 PM)tahir1990 Wrote: You mean in the folder where i installed python ?No,where you have placed
usstates.csv
.Example.
with open("usstates.csv", "r") as f: print(f.read())
C:\code λ python my_file.py Traceback (most recent call last): File "my_file.py", line 1, in <module> with open("usstates.csv", "r") as f: FileNotFoundError: [Errno 2] No such file or directory: 'usstates.csv'Now i try to open
usstates.csv
,but it's not in C:\code folder,if it where in this folder no error.If i give correct path to placement no error.
with open(r"C:\foo\usstates.csv", "r") as f: print(f.read())
C:\code λ python my_file.py hello