0
Fill in the blanks to try to open and read from a file. Print an error message in case of an exception.
Python 5th Module Quiz try : with open("test.txt") as f: print(f.read) ...................... print("Error)
2 odpowiedzi
0
q)try to open and read from a file print an error message in case of an exception?
ans: try:
with open("test.txt") as f:
print(f.read())
except:
print("error")