demo_for_break.py:
fruits = ["apple", "banana", "cherry"] for x in fruits: if x == "banana": break print(x)
C:\Users\My Name>python demo_for_break.py
apple