Skip to content

Instantly share code, notes, and snippets.

@ItsCosmas
Created May 9, 2019 08:14
Show Gist options
  • Save ItsCosmas/0cbf18ff7cc1606f83cfffd2744ad012 to your computer and use it in GitHub Desktop.
Save ItsCosmas/0cbf18ff7cc1606f83cfffd2744ad012 to your computer and use it in GitHub Desktop.
For Loop Break
# FOR LOOP BREAK
fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
break
print(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment