Try-
-Try block is a block in which we write that part of program where chances of exception will occur.
Finally-
It is part which will always run if exception will occur or not.
Syntax-
try
block
finally:
block:
program-
try:
n=1/int(input("Enter numbern"))
print(n)
except:
print("Number is divided by zero")
finally :
print("After try block")
Enter number
1
1.0
After try block
Enter number
0
Number is divided by zero
After try block