A python code only runs the except block when _____. Group of answer choices all the statements in the try block are executed an error occurs in the preceding try block the programmer manually calls the except block an error occurs anywhere in the code

Respuesta :

Answer:

Python only running exception block when try block fails

Explanation:

i do cyber security and i was learning this in high school

In Python, try and except statements are used to catch and manage exceptions. Statements that can generate exceptions were placed within the try clause, while statements that handle the exception are put within the except clause.

  • An exception should be caught by except block, which is used to test code for errors that are specified in the "try" block.
  • The content of the "except" block is executed if such a fault/error appears.
  • In Python, the exception block only runs when an error occurs in the try block.

Therefore, the answer is "try block fails ".

Learn more:

brainly.com/question/19154398