RSS Forums RSS
Please support our Python advertiser: Programming Forums
Views: 710 | Replies: 1
Reply
Join Date: Mar 2007
Posts: 1
Reputation: qkrtjgk86 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
qkrtjgk86 qkrtjgk86 is offline Offline
Newbie Poster

Help Help - recursive

  #1  
Apr 2nd, 2007
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!!!!!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2006
Posts: 221
Reputation: katharnakh is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 20
katharnakh's Avatar
katharnakh katharnakh is offline Offline
Posting Whiz in Training

Re: Help - recursive

  #2  
Apr 4th, 2007
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.
Last edited by katharnakh : Apr 4th, 2007 at 12:03 am.
challenge the limits
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:33 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC