>>: fsf
Traceback (most recent call last):
File "/Users/hexin/PycharmProjects/py3/day9/1.py", line 4, in <module>
int(num)
ValueError: invalid literal for int() with base 10: 'fsf'
except ValueError as e:
print(e)
except NameError:
print('NameError')
except KeyError as e:
print(e)
复制代码
>>:gg
invalid literal for int() with base 10: 'gg'