0 votes
in Python by
Take a look at the following code:try: if '1' != 1:

raise "someError"

else: print("someError has not occured")

except "someError": pr

int ("someError has occured")

What will be the output?

1 Answer

0 votes
by

The output of the program will be “invalid code.” This is because a new exception class must inherit from a BaseException.

...