Pattern Search Regular Expression
subhabangalore at gmail.com
subhabangalore at gmail.com
Sat Jun 15 10:31:05 EDT 2013
On Saturday, June 15, 2013 7:58:44 PM UTC+5:30, Mark Lawrence wrote:
> On 15/06/2013 14:45, Denis McMahon wrote:
>
> > On Sat, 15 Jun 2013 13:41:21 +0000, Denis McMahon wrote:
>
> >
>
> >> first_and_last = [sentence.split()[i] for i in (0, -1)] middle =
>
> >> sentence.split()[1:-2]
>
> >
>
> > Bugger! That last is actually:
>
> >
>
> > sentence.split()[1:-1]
>
> >
>
> > It just looks like a two.
>
> >
>
>
>
> I've a very strong sense of deja vu having round the same loop what, two
>
> hours ago? Wondering out aloud the number of times a programmer has
>
> thought "That's easy, I don't need to test it". How are the mighty fallen.
>
>
>
> --
>
> "Steve is going for the pink ball - and for those of you who are
>
> watching in black and white, the pink is next to the green." Snooker
>
> commentator 'Whispering' Ted Lowe.
>
>
>
> Mark Lawrence
Dear Group,
I know this solution but I want to have Regular Expression option. Just learning.
Regards,
Subhabrata.
More information about the Python-list
mailing list