with open in the python

technical talkiess
0

 # file open to the with block and the y will handle file file and self close the file


with open("test.txt") as f:
    # return the all file line in the list format
    a= f.readlines()
    print(a)
Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)