Skip to content

Instantly share code, notes, and snippets.

@ShadowofZeus
Created November 28, 2019 07:29
Show Gist options
  • Save ShadowofZeus/b5e73b933721e3de57a2e4ad39541109 to your computer and use it in GitHub Desktop.
Save ShadowofZeus/b5e73b933721e3de57a2e4ad39541109 to your computer and use it in GitHub Desktop.
Python-Excersise-3
"""
Lists
More conditionals (if statements)
"""
cap=int(input("Enter nummber to cap list: "))
listbaba = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
newlist=[]
for item in listbaba:
if item<cap:
newlist.append(item)
for new_item in newlist:
print(new_item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment