samedi 30 juin 2018

Why do functions print automatically when put in 'if' statement

Why is it that when this code is executed, I would get 'hi'?

Thanks!

def b():
    print("hi")
def c():
    return True
if b() == 'hi':
    print("Done")

Aucun commentaire:

Enregistrer un commentaire