0
l = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
num = int(input(print("Choose a number: ")))
new_list = []
for i in l:
if i < num:
new_list.append(i)
print(new_list)
I’m doing this exercise that asks to enter a number and print a new list based on the indicated that has all the values below the indicated by the user, but no output continues to print None
, for example:
Choose a number:
None 8
[1, 1, 2, 3, 5]
What I’m doing wrong?
Makes sense, thank you!
– Marcello Fabrizio