如何在ifclause中增加python范围内的索引I?

2024-09-30 08:34:24 发布

您现在位置:Python中文网/ 问答频道 /正文

a = "a4b4t8a3a3w2q5a8o9i8"
for i in range(0, len(a)):
  if a[i].isdigit() is False:
    print("detected letter")
    i +=5 #this does not increase the i by 5 each tiem I find a letter

这无助于索引“i”向前跳5。为什么


Tags: infalseforlenifisnotrange

热门问题