Skip to content

Instantly share code, notes, and snippets.

@JayeshTiwari03
Created February 22, 2018 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JayeshTiwari03/def2766d1fe471c5cd47b5b6d05aef11 to your computer and use it in GitHub Desktop.
Save JayeshTiwari03/def2766d1fe471c5cd47b5b6d05aef11 to your computer and use it in GitHub Desktop.
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
num = int(input("Choose a number: "))
new_list = []
for i in a:
if i<num:
new_list.append(i)
print (new_list)
@JayeshTiwari03
Copy link
Author

a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
new_list = []
for i in a:
if i<5:
new_list.append(i)
print (new_list)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment