python ***** ***** [Exception]
Others
2019-11-25 16:05:15
views: null
the try:
Val = INPUT ( "Enter a number: ')
NUM = int (Val)
the except Exception AS E: Print (' operational abnormality ')
# import requests
#
# try:
# ret = requests.get('http://www.google.com')
# print(ret.text)
# except Exception as e: # print('请求异常')
FUNC DEF (A):
the try:
return a.strip ()
the except Exception AS E: Pass return False V = FUNC ( "Alex") IF Not V: Print ( 'function fails') the else: Print ( 'result' , v)
Origin www.cnblogs.com/wujuzhi/p/11928284.html