Files: Basic Programming Using Python
Files: Basic Programming Using Python
Basics
So far, data for our programs are stored in the primary memory (RAM)
This means, when we exit our program, any data we entered will be
lost.
For this topic, we will learn how to make use of the secondary
memory (harddisk) to store data from our programs.
Commands to remember
open
close
write
Mandatory Activity
Create a program that will store the elements of a list into a file
named sample.txt. Use your classmates names as elements in the
list. Minimum of 5 names.