Examveda

What will be the output of the following Python code?
def foo():
    try:
        print(1)
    finally:
        print(2)
foo()

A. 1 2

B. 1

C. 2

D. none of the mentioned

Answer: Option A


This Question Belongs to Python Program >> Exception Handling In Python

Join The Discussion

Related Questions on Exception Handling in Python