catch error 2 python code example
Example 1: python catch multiple exceptions
except (IDontLikeYouException, YouAreBeingMeanException) as e:
pass
Example 2: only try python
try:
a=2
except:
pass
except (IDontLikeYouException, YouAreBeingMeanException) as e:
pass
try:
a=2
except:
pass