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

Lê Minh

Member
What will be the output of the following Python code?
Code:
def foo():
    try:
        print(1)
    finally:
        print(2)
foo()
A. 1 2
B. 1
C. 2
D. none of the mentioned
 

Tìm kiếm

Back
Top