Please support our Python advertiser: Programming Forums
Views: 709 | Replies: 1
•
•
Join Date: Mar 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
i am trying to sort a list using recursive function...
the first thing i want to do is to extract the maximum element and
append it to a recursively sorted sublist.
def selsort(l,maximum = 0, appending = ""):
if l:
if l[maximum]<l[len(l)-1]:
appending = l[0]
selsort(l[len(l)-1:0],maximum +1)
sort_list = sort_list.append(appending)
return sort_list
how can i get this to work... any help would be appreciated!!!!!
the first thing i want to do is to extract the maximum element and
append it to a recursively sorted sublist.
def selsort(l,maximum = 0, appending = ""):
if l:
if l[maximum]<l[len(l)-1]:
appending = l[0]
selsort(l[len(l)-1:0],maximum +1)
sort_list = sort_list.append(appending)
return sort_list
how can i get this to work... any help would be appreciated!!!!!
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Threaded Mode