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