thank you, here is the updated version: http://pastie.org/1186860
On Tue, Sep 28, 2010 at 5:50 PM, Emile van Sebille <em...@fenx.com> wrote: > On 9/28/2010 7:12 AM Norman Khine said... >> >> thanks for the reply, i think i have it now, perhaps it could be done >> better >> > > I think I'd use a helper function to sort: > > def sortOtherToEnd(val): > if val['name'] == 'other: > return 'zzzz' > return val['name'] > > #then sort it > > topics.sort(key=sortOtherToEnd) > > But, generally, I'd stop once I got it going without worrying too much about > 'better' ways -- that's a subjective measure. There is often one obvious > way to do it, but unless you've seen that way before, there'll often be many > alternatives that work as well. > > HTH, > > Emile > > _______________________________________________ > Tutor maillist - tu...@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- ˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝǝs noʎ 'ʇuǝɯɐן sǝɯıʇ ǝɥʇ puɐ 'ʇuǝʇuoɔ ǝq s,ʇǝן ʇǝʎ %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] ) _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor