Explore Courses Blog Tutorials Interview Questions
0 votes
in Python by (7.3k points)

I have a try...except block in my code and When an exception is throw. I really just want to continue with the code because in that case, everything is still able to run just fine. The problem is if you leave the except: block empty or with a #do nothing, it gives you a syntax error. I can't use continue because it's not in a loop. Is there a keyword I can use that tells the code to just keep going?

1 Answer

0 votes
by (106k points)

If you want to ignore an exception and want to proceed further then you can use the following piece of code:-



except Exception:


If you are interested to learn Python from Industry experts, you can sign up for this Python Certification Course by Intellipaat. 

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers


108k users

Browse Categories