vendredi 12 novembre 2021

Hey, My question would be why my code always displays "small int" no matter which typ i use?

def check_it(probe): if probe is str: return ("a string")

elif probe is int and probe > 100:
    return ("large int")
else:
    return ("small int")

print(check_it("hi"))

Aucun commentaire:

Enregistrer un commentaire