Welcome to Brannon's Reading Notes!

This serves as my personal page to keep and update my reading notes for Code Fellows Courses 201, 301, and 401.

Reading 3

Reading and Writing Python Files

What exactly is a file?

…a file is a continguous set of bytes used to store data.

### Parts of a Modern File

  1. Header - the overall information about the file (name, size, type, etc)
  2. Data - the meat and potatoes of the file
  3. End of File (EOF) - a characted marking the end of the file.

Opening and Closing Files in Python

-.read() - reads entire file -.realine() - reads entire line -.readlines() - reads remaining lines from file -.write(string) - does what it says -.writelines(seq) - writes with no line endings, that is up to you

Exceptions