Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading 2 lines
#1
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 !
Reply
#2
line1 = data_file.readline()
line2 = data_file.readline()
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  reading all lines from a text file seadoofanatic 2 2,953 Mar-13-2018, 06:05 PM
Last Post: Narsimhachary

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020