fork download
  1. l = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
  2. num = int(input("Choose a number: "))
  3. new_list = []
  4. for i in l:
  5. if i < num:
  6. new_list.append(i)
  7. print(new_list)
  8.  
  9. #https://pt.stackoverflow.com/q/359133/101
Success #stdin #stdout 0.02s 27704KB
stdin
8
stdout
Choose a number: [1, 1, 2, 3, 5]