It might be a really silly question, but I was not able to find the answer to it anywhere else, I've looked at SO, but there is nothing I could find related to my question.
Question:
In python, don't know about other languages, whenever we call if statements for a builtin class it returns something which the if statement interprets, For example,
a = 0
if a: print("Hello World")
The above statement does not print anything as the if a
is False
. Now which method returned that it is False
, or is there a method the if statement calls in order to know it ??
Or more precisely, how does the if statement work in python in a deeper level ?