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