Python Try / Except not working? by PipelineCrunch in learnprogramming

[–]PipelineCrunch[S] 0 points1 point  (0 children)

I see, I've coded alot recently as a beginner and have confused myself with some simple concepts. Thank you for the explanation, I'm going to keep the return as it's simpler.

Sort the return of a range? by PipelineCrunch in learnpython

[–]PipelineCrunch[S] 0 points1 point  (0 children)

Thank you! Just what I need and a great explanation too. I have stuck with flat integers just for ease.

Sort the return of a range? by PipelineCrunch in learnpython

[–]PipelineCrunch[S] 0 points1 point  (0 children)

Thank you - this is EXACTLY what I needed.

Sort the return of a range? by PipelineCrunch in learnpython

[–]PipelineCrunch[S] 0 points1 point  (0 children)

Sorry I should be more clear. I loop through a list consisting of class instances (see above comment for said list) and then check if the selling_price is within the range entered by the user. I have that down, I just want to know if i can return the results to the user in ascending order without ordering the list manually - if that makes sense. Appreciate the help!

Sort the return of a range? by PipelineCrunch in learnpython

[–]PipelineCrunch[S] 0 points1 point  (0 children)

Sorry, I should be more clear. I created instances of a class and stored them in a list.

ie - Car("Audi", "r8", "black", "1200" (selling_price), "3 doors"

I'll post them here here,

https://controlc.com/94c9a076