This seems like it should be very easy:
f = open('C:\Users\john\Desktop\text.txt', 'r')
But I am getting this error:
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
f = open('C:\Users\john\Desktop\text.txt', 'r')
IOError: [Errno 22] invalid mode ('r') or filename: 'C:\\Users\robejohn\\Desktop\text.txt'
Any thoughts?