Created
November 28, 2019 07:29
-
-
Save ShadowofZeus/b5e73b933721e3de57a2e4ad39541109 to your computer and use it in GitHub Desktop.
Python-Excersise-3
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
""" | |
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