what is an else if statement in python?

0 votes
how do we use else if statement in python? what is the syntax?

is it different from what we use java or c++.
Mar 13 in Python by Mohammad
• 1,400 points
20 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
if condition:

   statement

elif condition:

    statement

#this is how you use else if in python. apart from the syntax, everything else is same as in every other programming language.
answered Mar 15 by Waseem
• 2,790 points

Related Questions In Python

+4 votes
7 answers
0 votes
1 answer

how to exit a python script in an if statement

This works fine for me: while True: ...READ MORE

answered Sep 19, 2018 in Python by bug_seeker
• 15,300 points
474 views
+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
1,085 views
+1 vote
3 answers
0 votes
1 answer

How to use nested if else statement in python?

The working of nested if-else is similar ...READ MORE

answered Nov 19, 2018 in Python by Nabarupa
33 views
0 votes
1 answer

How to write inline if statement for print in Python?

Inline if-else expression must always contain the else ...READ MORE

answered Dec 4, 2018 in Python by Nymeria
• 3,500 points

edited Dec 6, 2018 by Nymeria 572 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
64 views
0 votes
1 answer

what is a type error in python?

you get a type error when you ...READ MORE

answered Mar 8 in Python by Waseem
• 2,790 points
36 views
0 votes
2 answers

what is null in python?

In python no primitive data types. python treats as ...READ MORE

answered Mar 13 in Python by rajesh kumar
19 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.