Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

Open File in Python and viewing contents of that file

$
0
0

I keep getting this error

runfile('C:/Users/Acer Predator/.spyder-py3/temp.py', wdir='C:/Users/Acer Predator/.spyder-py3') <_io.TextIOWrapper name='C:\Users\Acer Predator\est.txt' mode='r' encoding='cp1252'>

I have no idea what I am doing wrong. This is the code that I am using:

file = open ("C:\Users\Acer Predator\est.txt", "r") print(file)

Some help please!

Expecting the output to be the contents of the file


Viewing all articles
Browse latest Browse all 13891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>