Python (VII) Python classes, objects, and python exception handling mechanism
編輯:Python
Python Exception handling mechanism of
Python Common types of exceptions
try except structure
Exceptions are caught in the order of subclass first and then parent class , To avoid missing possible exceptions , It can be added at the end BaseException
try:
n1=int(input(' Please enter an integer :'))
n2=int(input(' Please enter an integer :'