- 1
Please can someone explain to me how to use break in while loop in python. I
I tried the example in the tutorial in pycharm IDE but it did output the same result
1 ответ
+ 8
For a certain condition , the loop ends.
Example:
If you set a loop to print all numbers from 1 to 100 , but you also write an
if num==50:
break
The loop will stop at 50 , and not at the ending (ending is 100)
#I am sorry if you don't understand.Bad English.