+ 1

What is else? A function or a statement

it does not have ; this as a statement neither () this like function.

20th Dec 2017, 11:48 AM
Abhishek Raj
Abhishek Raj - avatar
6 RĂ©ponses
+ 4
It's a keyword, and can't be used simultaneously (without if construction). It's used, when we want to do something, if the condition in the if construction is false. a = 5 b = 10 if (a >= b): print("a is greater or equal to b") else: print("b is greater than a") Without the else above we will not get an output, because b > a.
20th Dec 2017, 12:54 PM
Boris Batinkov
Boris Batinkov - avatar
0
read my question properly please
20th Dec 2017, 12:05 PM
Abhishek Raj
Abhishek Raj - avatar
0
it's a control structure
20th Dec 2017, 12:18 PM
Jeremy
Jeremy - avatar
0
answer is in your question. neither function nor statement
28th Dec 2017, 5:04 PM
H.F.A
H.F.A - avatar