mardi 9 octobre 2018

Python - What are all the ways to do if value ==?

I know you can do == but what else? Here are examples of what I know

value = 1
if value == 1:
    pass
if value.startswith(1):
    pass
if value is 1:
    pass

All of these mean: Does it equal 1? What other ways can I do this using if statements? It isn't that I need help with a problem, I am just curious.

Aucun commentaire:

Enregistrer un commentaire