how to use try catch with if else in python code example
Example: python try else
try:
a=2*3
except TypeError:
print("Exception raised")
else:
print("Everything is ok.")
try:
a=2*3
except TypeError:
print("Exception raised")
else:
print("Everything is ok.")