How to save the value of i in a for loop without letting the iteration affecting it

后端 未结 0 911
谎友^
谎友^ 2021-01-11 11:47

In this chunk of the code:

def lin_search(A,N,X):
  first_occurance = 0
  counter = 0

  for i in range(0, N):
    if counter != X:
      if A[i] == 0:
               


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题