Files
- File types: Text vs Binary
- Open vs. Read vs. Load
- Binary files: Images
- Reading an Excel file
- Reading a YAML file
- Read and analyze a text file
- Open and read file (easy but not recommended)
- Open and read file using with (recommended)
- Read file remove newlines
- Filename on the command line
- Filehandle with return
- Read all the lines into a list
- Read all the characters into a string (slurp)
- Not existing file
- Open file exception handling
- Open many files - exception handling
- Writing to file
- Print to file
- Append to file
- Binary mode
- Does file exist? Is it a file?
- Direct access of a line in a file
- Exercise: count digits
- Exercise: remove newlines
- Exercise: print lines with Report:
- Exercise: color selector
- Exercise: ROT13
- Exercise: Combine lists
- Exercise: Number guessing game - save to file
- Solution: count numbers
- Solution: remove newlines
- Solution: print lines with Report:
- Solution: color selector
- Solution: ROT13
- Solution: Combine lists
- Solution: Combine lists with tuple
- Filehandle using with and not using it