小编Joe*_*unk的帖子

Python for循环问题

我想知道如何在python中实现以下功能:

for( int i = 0; cond...; i++)
  if cond...
    i++; //to skip an run-through
Run Code Online (Sandbox Code Playgroud)

我试了这个没有运气.

for i in range(whatever):
  if cond... :
    i += 1
Run Code Online (Sandbox Code Playgroud)

python loops for-loop

26
推荐指数
2
解决办法
7万
查看次数

标签 统计

for-loop ×1

loops ×1

python ×1