lundi 29 avril 2019

if (either or) in python

I need to comparison the output of my program to print out the statement as results.

If any of this two condition is okay, I will print out Okay:

    if ((c+c1)==2 or counter>=(n/2)):
        print(‘okay’) 
    else:
        print(‘not_okay’)

how can I combine two condition in one line?

Aucun commentaire:

Enregistrer un commentaire