•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 426,136 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,796 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 680 | 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!!!!!
Place your code in between [code] tag so that it maintains proper indentation.
I would like you to see, http://www.daniweb.com/techtalkforum...ment114-3.html
kath.
I would like you to see, http://www.daniweb.com/techtalkforum...ment114-3.html
kath.
Last edited by katharnakh : Apr 3rd, 2007 at 11:03 pm.
challenge the limits
![]() |
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- recursive findaverage function for Binary search tree (C)
- Recursive binary search (C)
- recursive algorithm (C)
- how to recursive search of subdiretories in BASH script (Shell Scripting)
- Recursive prime number f(x) (C)
Other Threads in the Python Forum
- Previous Thread: Help needed for displaying extended charactors in Tk()
- Next Thread: racquetball simulation HELP!


Linear Mode