Elif will be executed only if above condition of if goes false. Now when u will use if in place of elif, code under if condition will be executed even even above if condition goes true. There will be extra code execution always despite the fact we dont need
Useful and informative video by engineer rizwan
why using elif when we cam again use if in the code
Elif will be executed only if above condition of if goes false. Now when u will use if in place of elif, code under if condition will be executed even even above if condition goes true. There will be extra code execution always despite the fact we dont need