¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
try to open &read msg from file ,print the error msg in casse of exception
1 Respuesta
+ 1
try:
f=open("filename.txt")
a=f.read ()
print a
except:
print "Error"
finally:
f.close ()