What is the difference between assert and break keywords? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 3

What is the difference between assert and break keywords?

27th Aug 2016, 6:35 PM
LALIT NEGI
LALIT NEGI - avatar
2 Antworten
+ 2
This is what i found for your question: ASSERT: Assert statements are a convenient way to insert debugging assertions into a program. BREAK: It terminates the current loop and resumes execution at the next statement.
27th Aug 2016, 8:46 PM
Daniel Dimitrov
Daniel Dimitrov - avatar
+ 2
one more difference i found is that assert keyword can be written outside the loop but it is not so with the break keyword. break keyword if written outside the loop gives error.
24th Mar 2017, 3:05 PM
LALIT NEGI
LALIT NEGI - avatar