From: D'Arcy J.M. Cain on
On Thu, 22 Apr 2010 15:04:01 +0100
Tim Golden <mail(a)timgolden.me.uk> wrote:
> > So please tell me if there is one or not. I really need this soon.
> > Appreciate a lot.
>
> Assuming top-k doesn't mean something obscurely statistical:

You really shouldn't do people's homework for them. It doesn't do
them any favours.

To the OP: Try to figure out how to do it without reversing the list.
It's simple.

--
D'Arcy J.M. Cain <darcy(a)druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
From: Grant Edwards on
On 2010-04-22, D'Arcy J.M. Cain <darcy(a)druid.net> wrote:
> On Thu, 22 Apr 2010 15:04:01 +0100
> Tim Golden <mail(a)timgolden.me.uk> wrote:
>> > So please tell me if there is one or not. I really need this soon.
>> > Appreciate a lot.
>>
>> Assuming top-k doesn't mean something obscurely statistical:
>
> You really shouldn't do people's homework for them. It doesn't do
> them any favours.

Doing people's homework for them is a survival mechanism -- it reduces
the competence of potential new rivals. :)

OTOH, if you do end up working with one of those a new grads with a
diploma but not a clue, you end up worse off because now you have to
teach them the problem solving skills they didn't learn in school.

--
Grant Edwards grant.b.edwards Yow! I just had a NOSE
at JOB!!
gmail.com
From: Steven Howe on
Really! Learn to use google better. I just used "python sort list"

Look at: http://wiki.python.org/moin/HowTo/Sorting

Read about list.sort. Try, at a command prompt (assuming you have a unix
shell), "pydoc list"
search for sort; read it. It mentions 'reverse'.

then slice the list to your desired set and return.

sph


On 04/23/2010 07:02 AM, Grant Edwards wrote:
> On 2010-04-22, D'Arcy J.M. Cain<darcy(a)druid.net> wrote:
>
>> On Thu, 22 Apr 2010 15:04:01 +0100
>> Tim Golden<mail(a)timgolden.me.uk> wrote:
>>
>>>> So please tell me if there is one or not. I really need this soon.
>>>> Appreciate a lot.
>>>>
>>> Assuming top-k doesn't mean something obscurely statistical:
>>>
>> You really shouldn't do people's homework for them. It doesn't do
>> them any favours.
>>
> Doing people's homework for them is a survival mechanism -- it reduces
> the competence of potential new rivals. :)
>
> OTOH, if you do end up working with one of those a new grads with a
> diploma but not a clue, you end up worse off because now you have to
> teach them the problem solving skills they didn't learn in school.
>
>