Python Forum

Full Version: Reading 2 lines
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I was wondering how you could make python read 2 lines of input with .readlines() instead of just 1 line. Because the information needed is on 2 lines of text.

Thanks !
line1 = data_file.readline()
line2 = data_file.readline()