#finally block always gets executed #else block is only executed if no exception was raised import math try: print("Hello, World!") print(10/ 5) print(math.sqrt(-9)) except ValueError: print("a ValueError has occurred") except IndexError: print("IndexError has occurred") else: print("No Exception was raised.") finally: print("This block always gets executed")