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 functionCopyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
python 为什么用return会报错啊?-PHP中文网问答-python 为什么用return会报错啊?-PHP中文网问答
围观一下哦,学习一下。