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。为什么?
答案 0 :(得分:0)
尝试一下
a[i + 5]
代替
i + 5