- #1
zeion
- 466
- 1
Homework Statement
Hi, this might be silly but I'm not sure what the syntax is for the read function...
I'm trying to open a file on my desktop, it is a text file called testfile.txt, how do I make python know where to find it?
I go:
f = open('C:\Users\Truman\Desktop\testfile.txt', 'r')
or
f = open('testfile.txt', 'r')
but neither works.
Does the file need to be in the same directory as where I installed Python?
Thanks.