Answer to Question #3379 in Python for mukunda
Write a python program to print first 2 lines from “rgukt.txt” file
1
2011-08-02T14:07:09-0400
ctr = 2
for s in open ("rgukt.txt"):
if s[-1] == '\n': s = s[:-1]
print(s)
ctr -= 1
if ctr == 0: break
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
Python
Comments
Leave a comment