0

try to open &read msg from file ,print the error msg in casse of exception

24th Oct 2016, 2:11 PM
ashwini salgar
ashwini salgar - avatar
1 Antwort
+ 1
try: f=open("filename.txt") a=f.read () print a except: print "Error" finally: f.close ()
1st Dec 2016, 12:07 PM
Binara Sachin