Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This program prints the elements of a list that are less than a specified number
- def ex3():
- a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
- b = []
- num = int(input("Please enter a number: "))
- for each in a:
- if each < num:
- b.append(each)
- print(b)
Add Comment
Please, Sign In to add comment