We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
this question taught me a lot.i didnt even know that python has a concept of for-else,i thought that we can use else with a preceding if but there's more to it.
basically in a for-else,the else bloock is exceuted if the loop ran completely and was not interupted by a break statement.
String Validators
You are viewing a single comment's thread. Return to all comments →
this question taught me a lot.i didnt even know that python has a concept of for-else,i thought that we can use else with a preceding if but there's more to it. basically in a for-else,the else bloock is exceuted if the loop ran completely and was not interupted by a break statement.