I'm making a program to sort numbers from lowest to highest as long as the numbers are under 300, but I can't figure out how to change the user input into a list. Here's my code:
List1=[]
List2=[]
var=1
thing=input("Insert numbers here")
List1.append(thing)
while var < 300:
for that in List1:
if that < var:
List2.append(number)
var = var + 1
print(List2)
When I run the code, it says that in the 8th line, a string can't be compared with an int. Please help. Thanks in advance.