Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

select numbers from a list with a limit python

a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] #You can put the list you want
b = []
limit = int(input("Max number selected: "))
for n in a:
    if n < limit:
        b.append(n)
    else:
        pass
print(a, b)
 
PREVIOUS NEXT
Tagged: #select #numbers #list #limit #python
ADD COMMENT
Topic
Name
5+8 =