How to read the first line from text file in Python

1 Answer

0 votes
with open('info.txt', 'r') as f:
    print(f.readline())


'''
run:

Python is an interpreted, 

'''

 



answered Jun 22, 2020 by avibootz

Related questions

1 answer 326 views
3 answers 457 views
1 answer 307 views
2 answers 363 views
2 answers 418 views
1 answer 328 views
...