Computer Science

Forced exceptions are indicated using which of the following keywords?

  1. try
  2. except
  3. finally
  4. raise

Python Exception Handling

1 Like

Answer

raise

Reason — The raise statement allows the program to force a specified exception to occur at runtime. When a program encounters an abnormal condition during execution, an object of this exception is created and then thrown or raised to the code responsible for catching and handling it.

Answered By

3 Likes


Related Questions