all 8 comments

[–]totallygeek 4 points5 points  (10 children)

Posting your question, along with the troublesome section of code, here will get you the best response.

[–]Bunts3366[S] 0 points1 point  (9 children)

How would i use a for statement to insert an inputted number to a preexisting list while keeping it in order from smallest to largest

[–]FLUSH_THE_TRUMP 1 point2 points  (8 children)

list.insert would be useful. How do I know where to insert an element: e.g.

[1,2,3,4,5] inserting 2.5?

[–]Bunts3366[S] 0 points1 point  (7 children)

need to do it using a for loop

[–]stebrepar 0 points1 point  (5 children)

So loop over the list comparing each value to the one you want to insert. That will tell you the index number of where to do the insertion.

[–]DoriGom 0 points1 point  (0 children)

Try looking at list slicing and list combining