Save
Programming fundamentals
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Ryan Hegan
Visit profile
Cards (5)
File handling
Opens a file ready for
processing
Closes a file
Reads
one
line
of text at a time from an open file
Writes one line of
text
at a time to an open
file
Loops through a text file
line-by-line
and
prints
out each line
View source
Data types
Integer: Whole
number
Real/float:
Number
that can have a
fractional
part
Character: A single
letter
, symbol or number
String:
Multiple characters
Boolean: Has two values:
true
or
false
View source
Python code for reading
one line
of text at a time from an open file
View source
Python code for writing
one line
of text at a time to an
open
file
View source
Python code for looping through a text file
line-by-line
and
printing
out each line
View source