Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+2 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.9k points)

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.9k points)
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 (4.2k points)
0

Outside, should it be inside?

0

No, it should be outside.

0

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

...