Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Reading and Writing Files in Python: Summary

In this course, you learned about reading and writing files in Python. You covered everything from what a file is made up of to which libraries can help you along that way. You also took a look at some basic scenarios of file usage as well as some advanced techniques.

You now know what makes up a file and why that’s important in Python, the basics of reading and writing files in Python, and some basic scenarios of reading and writing files.

Avatar image for Abby Jones

Abby Jones on July 10, 2019

Fantastic course!

Avatar image for aradim

aradim on July 13, 2019

EXCELLENT COURSE! Thank you

Avatar image for andersgs

andersgs on July 14, 2019

Thank you. I learned about bpython and the pattern:

python if input() == 'x': break

That will be very useful.

For manipulating paths, however, I do prefer pathlib (docs.python.org/3/library/pathlib.html). I think the PEP around the rationale for pathlib is worth a read (www.python.org/dev/peps/pep-0428/).

Thank you again for the great tutorial.

Avatar image for Robert

Robert on July 14, 2019

Very nice,

Watching it is helping me to get through an area where I’ve been stuck. I’ll be back to watch several times and type it out, such is my memory ( need an upgrade!).

Thank you,

Avatar image for sion

sion on July 26, 2019

Covered the basics and useful extensions of them. Well presented, thank you.

Avatar image for ALXTheMaster

ALXTheMaster on July 31, 2019

Great course! i like when you keep writing the code again and again, that just makes me better just by watching, by the time i opened pycharm, i was distracted doing something else, but then i challenged myself to write the code by not looking at the video after 35 minutes and guess what, i am a beginner and it got stock in my head. THANK YOU!

Avatar image for michelnakhla

michelnakhla on Aug. 25, 2019

Excellent and clear.

Avatar image for michelnakhla

michelnakhla on Nov. 25, 2019

Great course, professionally done.

Avatar image for Victor Amadi

Victor Amadi on Nov. 29, 2019

Really informative. Thanks Darren.

Avatar image for markthiele

markthiele on March 19, 2020

Thanks, very useful!

Avatar image for Cristian Palau

Cristian Palau on April 10, 2020

Thank you!

Avatar image for pshapard

pshapard on April 12, 2020

Thanks for this course.

Avatar image for Howard M Sherman

Howard M Sherman on April 22, 2020

I’m sort of a newbie to Python, and I believe that this course would be much richer if it gave some more background information to some fundamental topics such as: text vs. binary data; reading files a line at a time vs. reading the whole file into memory at once; unicode data and its utf-8 encoding vs. ascii; etc. Reading and writing files is a fundamental skill for Python or any other programming language, and I just feel this course was a bit short on the background information needed for one who isn’t already experienced in Python to benefit.

Avatar image for Dan Bader

Dan Bader RP Team on April 22, 2020

Thanks for your feedback Howard! This course is intended for an intermediate skill level. If you’re looking for an introduction to working with files in Python, I’d like to recommend the following resources:

Avatar image for beingpython

beingpython on Aug. 29, 2020

Very well done!

Avatar image for Ghani

Ghani on Nov. 2, 2020

Nice and simple introduction to the subject; thanks a lot!

Avatar image for Eriberto

Eriberto on Nov. 6, 2020

Love the course, good job by the author. Would have been more great if exercise files were added to the resources link. Yeah, I know there is supplementary post related to this like realpython.com/read-write-files-python/#what-is-a-file but the exercises presented can be a good hands on to follow along if exercise files were added. Overall thumbs up to Darren.

Avatar image for scottbeecher

scottbeecher on July 30, 2021

Excellent layout; nicely paced.

Avatar image for nickyniu123

nickyniu123 on Aug. 27, 2023

Very good course.

Become a Member to join the conversation.