Using With Block To Open Python Files

Code file as described in the video

with open("harry.txt") as f:
    a = f.readlines()
    print(a)

# f = open("harry.txt", "rt")
#Question of the day - Yes or No and why?
# f.close()
  


Comments(1)

nazishali at 2019-06-23 09:30:09 says
Yes, It's working....