Wednesday 12 July 2017

36 try and except Exception as in python

aa
#####001
try:
    a=5/0
except Exception as e:
    print(e)

    '''

try:
    sal=open("C:\\Users\\lachu\\Desktop\\sa.txt","r")
    print(sal.read())
    sal.close()
except Exception as ee:
    print(ee)
 

No comments:

Post a Comment