for (i = 0; i < 10; i++)
if someCondition:
i+=1
print i
|| 转python实现
v
i = 0
while i < 10
if someCondition
i += 1
print i
i += 1
代码引用 Python: is there a C-like for loop available?
有什么更优雅的实现吗?
for (i = 0; i < 10; i++)
if someCondition:
i+=1
print i
|| 转python实现
v
i = 0
while i < 10
if someCondition
i += 1
print i
i += 1
代码引用 Python: is there a C-like for loop available?
有什么更优雅的实现吗?
4 回答4.4k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
1 回答3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
1 回答4.5k 阅读✓ 已解决
1 回答3.8k 阅读✓ 已解决
1 回答2.8k 阅读✓ 已解决