The if…elif…else statement is used in Python for decision making.When you want to justify one condition while the other condition is false, then you use 'if statement'. The 'else condition' is usually used when one condition goes wrong or fails to meet the requirement.By using 'elif' condition, you are telling the program to print out the third condition or check for 4th,5th possibilities when the other condition goes wrong or incorrect. Syntax: if test expression: Body of ifelif test expression: Body of elifelse: Body of else - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
15 followers study24x7 22 Jan 2019 01:08 AM study24x7 study24x7

The if…elif…else statement is used in Python for decision making.
When you want to justify one condition while the other condition is false, then you use "if statement".
The "else condition" is usually used when one condition goes wrong or fails to meet the requirement...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles