lundi 1 juin 2015

Using counter in condotion in python

Imagine I have the following code:

i=0
while True:
    if flag==True and i=i+5:
        func()
    .
    .
    .
    i+=1
    break

shouldn't be i==i+5?

I want to run fuc() each 5 times.

Aucun commentaire:

Enregistrer un commentaire