Difference between else and elif .(python) [solved] | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Difference between else and elif .(python) [solved]

11th Sep 2018, 5:54 PM
partha
partha - avatar
2 Réponses
+ 5
Elif and else are used during if else statements. But elif is used to add another condition. On the other hand, else includes every condition not specified with an if or elif statement. Example: if(age<10) ... elif(age>10&&age<20) ... else ... So else includes every age bigger than 20
11th Sep 2018, 5:59 PM
Ledio Deda
Ledio Deda - avatar