Else and Elif

--Originally published at Py(t)hon

Continuing with the course, we have the next step that is the else and elif statement. Let’s start with else, in the else statement is where you are going to put the block of code that you want to execute if the conditional in the if statement turns out to be False or 0.

Here is an example:

else-1

On the other hand, we have the elif expression, that allows you to check for multiples condition for True and as soon as one of then turns out to be True, run.

Here is an example:

elif-1

Here is a video, for the people than didn’t understand me:

#Tec#Python#Else#Elif#ISC#TC101#Pug