小编cry*_*mer的帖子

为什么 print(x += 1) 语法无效?

这很好用

x = 0
while True:
    x += 1
    print(x)
Run Code Online (Sandbox Code Playgroud)

而这

x = 0
while True:
    print(x += 1)
Run Code Online (Sandbox Code Playgroud)

我想要一个可以计数到无穷大或至少直到最大位数的程序

python syntax python-3.x

1
推荐指数
1
解决办法
205
查看次数

标签 统计

python ×1

python-3.x ×1

syntax ×1