def sort(L,Lsorted):
if len(L)==1:
return Lsorted.append(L[0])
a = min(L)
Lsorted.append(a)
L.remove(a)
return sort(L,Lsorted)
The idea is that each time, you remove the smallest element of L and append to another list, and then in the end you return the other list.
This code returns None when I do this:
if __name__=='__main__':
L = [9,1,11]
L1 = []
print(sort(L,L1))