In Python, the "if", "elif" (short for "else if"), and "else" statements are used for conditional statements. The "if" statement allows you to execute a block of code if a certain condition is true. The "elif" statement provides an additional condition to check if the previous condition was false. If none of the conditions are met, the "else" statement allows you to specify a default block of code to execute.
if Statements
Python if Statement is used for decision-making operations. It contains a body of code which runs only when the condition given in the if statement is true. If the condition is false, then the optional else statement runs which contains some code for the else condition.
If with else
If with elif and else