Multiple try codes in one block
I have a problem with my code in the try block. To make it easy this is my code: try: code a code b #if b fails, it should ignore, and go to c. code c #if c fails, go to d code d except: pass Is something like this possible? You'll have to make this separate try blocks: try: code a except ExplicitException: pass try: code b except ExplicitException: try: code c except ExplicitException: try: code d except ExplicitException: pass This assumes you want to run code c only if code b failed. If you need to run code c regardless , you need to put the try blocks one after the other: try: code a