Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+3 votes

I can't figure out the reason but when I try to make my list on question two I keep getting none, instead of my list, I am not sure what my mistake is.

asked in CSC201 Spring 2021 by (1 point)

2 Answers

+2 votes

Oops nevermind, I figured it out. I set my list equal to a new list when sorting it instead of just sorting it.

answered by (1 point)

Yes, list.sort() does not return a new list.

0 votes

Did you create the empty list inside or outside the loop?

answered by (1 point)

Outside, should it be inside?


No, it should be outside.


What did you write on the line which returns the list?