华尔街之狼学PY 发表于 2024-12-20 16:37:04

removeprefix 报错

求救
明明用了最新版本的Python, removeprefix还是用不了

代码如下报错


hello
3.12.4 (v3.12.4:8e8a4baf65, Jun6 2024, 17:33:18)

Process finished with exit code 0

susan_notion="www_Ilovefishc"
print(susan_notion.removesuffix.(www_))


print(susan_notion.removesuffix.())
                                    ^
SyntaxError: invalid syntax

Process finished with exit code 1

华尔街之狼学PY 发表于 2024-12-20 16:48:16

为什么在Idle里面可以用,但是在Pycharm里面用不了啊阿啊

华尔街之狼学PY 发表于 2024-12-20 16:50:47

没事了是我自己多打了一个点。。。

某一个“天” 发表于 2024-12-20 23:21:38

不需要.

zyx2012 发表于 2024-12-29 07:43:11

华尔街之狼学PY 发表于 2024-12-20 16:48
为什么在Idle里面可以用,但是在Pycharm里面用不了啊阿啊

多打了一个点
页: [1]
查看完整版本: removeprefix 报错