Does the following Python code execute both if and else?
if print("welcome"):
print("heelloo!")
else:
print("bbye!")
This piece of code prints both welcome and bbye. So, is the if condition never executed, or is it something else? Kindly explain as I am fairly new to Python.
Aucun commentaire:
Enregistrer un commentaire