-
-
Save michaeltennant4554/5b58b4be4881b32a6e7fa8b4038b4b21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bag = ["chicken" , "Tom hanks" , "christmas cake"] | |
for item in bag: #this will make a item go each time | |
print(item) #this will make the item print on the list | |
#now heres a more advanced loop :8 | |
bag = ["chicken" , "Tom hanks" , "christmas cake"] | |
for item in bag: #starts to look through the bag for the item u want | |
if item == "chicken": #checks if item is in the bag | |
print("dammmmm thats some nice chicken") | |
else: | |
print("hmmmmmmm thats noT CHICKEN") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment