gpt4 book ai didi

python - 无效语法错误

转载 作者:太空宇宙 更新时间:2023-11-04 09:13:47 25 4
gpt4 key购买 nike

我的代码是:

if any(s in attrs["show"] for s in ("Apple Mac OS","Intel Mac OS")):

错误是:

 if any(s in attrs["show"] for s in ("Apple Mac OS","Intel Mac OS")):
^
SyntaxError: invalid syntax

我可以在一台机器上成功运行相同的脚本,然后我将它复制到另一台机器上,它返回这个错误,真的不知道为什么

最佳答案

您的机器上有旧版本的 Python,无法运行它。就像,一个非常旧的版本;我相信这个特性是在 Python 2.4 中添加的。

关于python - 无效语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11797942/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com