0

why getting "invalid syntax error" instead of "Error in try except block"

try: try: print(2 + "Hello") Except: print("Error occurred") except: print("Error in try except block")

10th Mar 2019, 5:07 AM
Anupam Singh
Anupam Singh - avatar
2 Answers
+ 3
Line 4: except must be lowercase. The Syntax error is thrown by the interpreter before the program is even executed.
10th Mar 2019, 5:12 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Oh yes. Thanks
13th Mar 2019, 4:53 PM
Anupam Singh
Anupam Singh - avatar