0
How does the "elif" work 😥 in python
I have been trying to understand it but can't
3 Respuestas
+ 2
Just think of it as being short for "else if".
It doesn't mean anything special beyond being a short form for "else if"
Do you know what else and if mean?
+ 2
Yo said: "
So is it like ...if "if" evaluates False .Python checks the condition of elif ?"
Yes. If you understand "else", you should understand elif.
A little example:
x = 3
if x == 3:
print('3')
elif x == 4:
print('4')
else:
print('something else')
+ 1
So is it like ...if "if" evaluates False .Python checks the condition of elif ?