Ex15: Curious of the output

In the output that I got:

Here’s your file: <_io.TextIOWrapper name=‘ex15_sample.txt’ mode=‘r’ encoding=‘cp1252’>
This is stuff I typed into a file.
It is really cool stuff.
Lots and lots of fun to have in here.
Type filename again:
ex15_sample.txt
This is stuff I typed into a file.
It is really cool stuff.
Lots and lots of fun to have in here.

Not sure why it showed up as:

<_io.TextIOWrapper name=‘ex15_sample.txt’ mode=‘r’ encoding=‘cp1252’>

While Zed’s was just the name of the file.

Just curious as to why.

It looks like you’re printing the file object, not the name. If you want us to help you find out why we’d need to see your code.

I got what you meant. That is exactly what I did. Thanks for helping :slight_smile: