"Except: " not working properly | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

"Except: " not working properly

When i am using "except" all the error are not being hidden try: word= "Wha ty? Leave it print(word) except: print("An unexprected error occcured")

13th Oct 2021, 7:19 AM
Shaurya Agarwal
Shaurya Agarwal - avatar
3 Answers
+ 7
You cannot handle Syntax Errors with "except"
13th Oct 2021, 8:04 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
Just use "else" sir
13th Oct 2021, 8:13 AM
Cyber Nate
Cyber Nate - avatar