with block in python file handling

technical talkiess
0

this is handle automatic file process and replace the old method 


with open("vishal.txt") as f:

    a = f.readline()
    print(a)

f = open('vishal.txt')
a= f.readline()
print(a)
Tags

Post a Comment

0Comments

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

Post a Comment (0)