Open Educational Resources

Document Type

Lecture or Presentation

Publication Date



This is an introduction to work with files in Python.

Prior knowledge of variables, assignments, expressions, input-output, lists, conditionals, and loops is recommended.

For CS0 students. Part of the CUNY CS04All project.


Lecture slides come in three formats and separate files.

Programs accompanying the lecture slides are in a programsForLectureSlides.rar archive.

In-class work, HW assignment, assessment questions together with all the programs are in the Activities_and_Assignments.rar archive.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License.



To view the content in your browser, please download Adobe Reader or, alternately,
you may Download the file to your hard drive.

NOTE: The latest versions of Adobe Reader do not support viewing PDF files within Firefox on Mac OS and if you are using a modern (Intel) Mac, there is no official plugin for viewing PDF files within the browser window.