mercredi 31 juillet 2019

how can i print the value or equation that is performing in an if statement

If I have an if statement that says

                       if f1_date == f2_date:    
                           if f2_number > f1_number:
                               print('WIN')
                               continue
                           elif f2_number <= f1_number:
                               print('lose')

can I print the part of the statement that says if f2_number > f1_number, so for example, if there's a row where f1_number = 1000 and f2_number = 2000 then is there a way to print out just 1000 or 2000 > 1000?

Aucun commentaire:

Enregistrer un commentaire