15/15: Returning none and I don't know why


#1

I'm not sure why (I'm script kiddie junior) this code is returning 'none.'


You see, I thought I'd returned the answer in line 15 there, but I must not have.

Any insight is helpful.


#2

The problem is:

new.append(x.sort())

you don't really append new by x, but rather just sort the list x which doesn't give anything back to you
so you have to assign the sorted list somewhere before you try to append the new-list with it :slightly_smiling:

try to rewrite it like this:

x = x.sort()
and then:
new.append(x)