python ***** ***** [Exception]

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) 

Guess you like

Origin www.cnblogs.com/wujuzhi/p/11928284.html