RosettaCodeData/Task/Input-loop/Python/input-loop-3.py

3 lines
141 B
Python
Raw Normal View History

2013-04-10 21:29:02 -07:00
line = my_file.readline() # returns a line from the file
lines = my_file.readlines() # returns a list of the rest of the lines from the file