>when the items are exhausted (which was immediately when the sequence was empty), the suite in the E LSE
clause, if present, is executed, and the loop terminates.
< Span class= "Hljs-keyword" >< Span class= "Hljs-keyword" >>a break statement executed in The first suite terminates the loop without executing the else Clause ' s suite.
< Span class= "Hljs-keyword" >< Span class= "Hljs-keyword" >< Span class= "Hljs-keyword" > A continue statement executed in the First Suite skips the rest of The Suite and continues with the next Item,
Or with the else clause if there is no next item.
According to the official documentation: the main idea is that when the iteration of an object iterates and is empty, the clause in else is executed,
If a break is included in the For loop, the loop is terminated directly and the ELSE clause is not executed.
Python for loop paired with else traps