What is the expected behavior of the following code?
What is the expected behavior of the following code?
C
This is ValueError, thus 'except' will be executed. It means answer is C
s='2A' try: n=int(s) except TypeError: n=3 except LookupError: n=2 except: n=1 print(n) Ans is C
C. it outputs 1