Re: Idiom for "last word in a string"

2009-09-23 Thread Christos Trochalakis
At Wed, 23 Sep 2009 18:47:05 + (UTC), Grant Edwards wrote: > > I recently ran across this construct for grabbing the last > (whitespace delimited) word in a string: > >s.rsplit(None,1)[1] > > It was somewhat obvious from the context what it was supposed > to do, but it took a bit of Goog

Re: Idiom for "last word in a string"

2009-09-23 Thread Christos Trochalakis
At Wed, 23 Sep 2009 18:47:05 + (UTC), Grant Edwards wrote: > > I recently ran across this construct for grabbing the last > (whitespace delimited) word in a string: > >s.rsplit(None,1)[1] > > It was somewhat obvious from the context what it was supposed > to do, but it took a bit of Goog

Re: Idiom for "last word in a string"

2009-09-23 Thread Christos Trochalakis
At Wed, 23 Sep 2009 18:47:05 + (UTC), Grant Edwards wrote: > > I recently ran across this construct for grabbing the last > (whitespace delimited) word in a string: > >s.rsplit(None,1)[1] > > It was somewhat obvious from the context what it was supposed > to do, but it took a bit of Goog

Re: Idiom for "last word in a string"

2009-09-23 Thread Christos Trochalakis
At Wed, 23 Sep 2009 18:47:05 + (UTC), Grant Edwards wrote: > > I recently ran across this construct for grabbing the last > (whitespace delimited) word in a string: > >s.rsplit(None,1)[1] > > It was somewhat obvious from the context what it was supposed > to do, but it took a bit of Googlin