Exceptions are referred to as run-time errors. While coding in python, we can encounter multiple types of exceptions. Complete list of python exceptions can be found here.
Exceptions which are not fatal for execution of the remaining program can be avoided by using try & except statements
An example of the try & except code will be as follows –
def askint(): try: val = int(raw_input("Please enter an integer: ")) except: print "Looks like you did not enter an integer!" finally: print "Finally, I executed!" print val