The "else" and "elif" clauses are not statements on their own, but rather part of a previous if statement. Think of them all as a single if/elif/else compound statement.
Take a look at:
.... if condition_1:
.... .... statements_1
.... elif condition_2:
.... .... statements_2
.... elif condition 3:
.... .... statement_3
.... .... statements_4
That's all one compound statement. It will test condition_1, condition_2, then condition_3 in order, but only up to the first condition that is True. So condition_2 and condition_3 are not even evaluated if condition_1 was True.
The indented block of statements after the first True condition are executed. If all conditions evaluate as False, then the statements under "else" are executed (or nothing is done if there is no else.)
So, the difference between
is that the second example is two independent if statements (each with no elif or else parts), but the first is a single if/elif/else (without the else). In the first case, condition_2 will be tested ONLY if condition_1 was false.
In the second case, the second if statement always runs after the first one finishes.