try: a=2*3 except TypeError: print("Exception raised") else: print("Everything is ok.")
Here is what the above code is Doing:
1. We are trying to multiply 2 and 3.
2. If there is a TypeError, we print “Exception raised”.
3. If there is no TypeError, we print “Everything is ok.”