0

Python 3

May anyone help with the distinction of the "if" and "elif" statement in pytho

27th Sep 2018, 11:35 AM
231AG
231AG - avatar
2 Respostas
+ 1
The difference between the two is that the if statement is the starting point of a chain of if/elif/else statements (I.e. the first to run within the chain). The elif statement will only run if the previous if statement returns false, and will not run otherwise.
27th Sep 2018, 12:13 PM
Faisal
Faisal - avatar
+ 1
Thanks sir!
27th Sep 2018, 1:12 PM
231AG
231AG - avatar