If there are more than one except:
branches after the try:
, can we say that:
try:
blocks will be executedtry:
blocks will be executedtry:
block will be executedtry:
blocks will be executedIn my opinion, the right answer will be "not more than one try:
", but maybe "one or more of the try:
"?
It will show an error like this:
SyntaxError: default 'except:' must be last
You can either run this code:
try:
something...
except:
something...
finally:
something...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.