lundi 24 octobre 2016

If statement not triggering

I am trying to make this code alternate between setting i as 56 and i as 0 I cant seem to get the second if statement to trigger. The first one works.

  while True:
        print 'is55 before if logic is' + str(is56)
        if is56 == True:
            i = 0 
            is56 = False 
            #print 'true statement' + str(i)
            print 'True is56 statement boolean is ' + str(is56)
        if is56 == False:   
            i = 56 
            is56 = True                
        print  'i is ' + str(i)

Aucun commentaire:

Enregistrer un commentaire