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.

Categories

+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)
0

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)
0

Outside, should it be inside?

0

No, it should be outside.

0

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

...