Python exception is used to handle exception in a program, when we write a program it is good habit to write the code within try except block, using these blocks we can handle errors of program and error on program will not raise an error and rest of the code will run without any affect.
print("There is an error")
Write code or part of program here, in which exception may occur
This block will run when an exception occur
This block will run always whatever an exception occur or not