Jun-18-2024, 07:17 PM
If an exception was raised in your
try
block, all remaining code will be ignored and execution jumps to the except
block. From what I can see from your code, your output code should be inside your try
block. Because when no exception was raised it should run that code. If an exception was raised you can handle that within the except
block.