demo_try_except3.py:
#The try block does not raise any errors, so the else block is executed: try: print("Hello") except: print("Something went wrong") else: print("Nothing went wrong")
➜ begtut>python demo_try_except3.py
Hello
Nothing went wrong