84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
try: r = requests.get('http://www.baidu.com',timeout=30) r.raise_for_status() r.encoding = r.apparent_encoding return r.text except: return '我怎么知道又错了' SyntaxError: 'return' outside function
import requests try: r = requests.get('http://www.baidu.com',timeout=30) r.raise_for_status() r.encoding = r.apparent_encoding except: print('我怎么知道又错了') print(r.text) return是在函数中返回
return 需要在函数里面才能使用
return 一般只能用在函数中。
return 需要在函数里面才能使用
return 一般只能用在函数中。