What is the main difference between while/else vs. if/else?


#1

What is the main different between while/else vs. if/else?

Can anyone show an example that can emphasize on the difference?

Thanks


#2

@nhanthanhthai,
Maybe this article helps
http://stackoverflow.com/questions/1576537/why-does-else-behave-differently-in-for-while-statements-as-opposed-to-if-try-st
found with a google-search
python while/else vs if/else site:stackoverflow.com