If vs. else if vs. else statements?

No, they are not the same.

if statement:
if statement: 

If the first statement is true, its code will execute. Also, if the second statement is true, its code will execute.

if statement:
elif statment:

The second block will only execute here if the first one did not, and the second check is true.

if statement:
else:

The first statement will execute if it is true, while the second will execute if the first is false.

Leave a Comment