Mohammed A.
asked 04/16/22
Which statement allows the loop code block to completely stop or exit the loop when it has been triggered:
Trevor S.
answered 04/17/22
Python Software Engineer
The break statement provides you the option to leave a loop when an external condition is triggered.
Example:
for value in "python":
if value == "o":
break
print(value)
print("Loop Ended")
Still looking for help? Get the right answer, fast.
OR
Find an Online Tutor Now
Choose an expert and meet online.
No packages or subscriptions, pay only for the time you need.