Am I right in my understanding that the if statement will only 'execute' if it evaluates True?
If so, what is the purpose of types returning True?
What is the logic behind this rule? And can someone give me an example of where it would be useful?
example:
""" Example """
def test(x):
if float:
print("success")
test(9)
test('\ntesting')
Returns:
Aucun commentaire:
Enregistrer un commentaire