0
What is break statement
Kindly explain with basic example
6 odpowiedzi
+ 5
Hi use the language name in tag .
Break statement will stop further execution of loop .For example in python
count=0
while true:
print(5)
count+=1
if count==6:
break
the above loop will print 5 five times and when the count is equal to 6 loop will break .
+ 5
Abhay I think you meant count += 1 or count = count + 1 instead of count++
+ 3
FunOfCoding maybe I don't even remember python syntax at all ! Thks for correcting!
+ 3
Thanks a lot well explained Abhay
+ 1
FunOfCoding thanks for the correction
0
Please search your question before asking it here.