for i in range(1,51): if(i%2!=0 & i%3!=0): print(i)
Here for i=7, i%2!=0 evaluates to 1 and i%3!=0 also evaluates to 1. 1&1 also evaluates to 1. So 7 should be printed so why it is not printed.
Aucun commentaire:
Enregistrer un commentaire