What will be the output of the following Python code? [code]try: if '1' != 1: raise "someError" else: print("someError

Trần Vũ

New member
What will be the output of the following Python code?
Code:
try:
    if '1' != 1:
        raise "someError"
    else:
        print("someError has not occurred")
except "someError":
    print ("someError has occurred")
A. someError has occurred
B. someError has not occurred
C. invalid code
D. none of the mentioned
 

Tìm kiếm

Back
Top