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 206 views
3 answers 296 views
1 answer 180 views
2 answers 229 views
2 answers 296 views
1 answer 235 views
...