Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48297
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Pattern Search Regular Expression |
| Date | 2013-06-15 13:45 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <kphr62$su9$11@dont-email.me> (permalink) |
| References | <afd6b280-3b64-467b-a2e1-2b36377cd13a@googlegroups.com> <51bc3c4d$0$29997$c3e8da3$5496439d@news.astraweb.com> <kphfdr$su9$8@dont-email.me> <mailman.3371.1371293740.3114.python-list@python.org> <kphqu1$su9$10@dont-email.me> |
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. -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 02:42 -0700
Re: Pattern Search Regular Expression Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 10:05 +0000
Re: Pattern Search Regular Expression Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 10:24 +0000
Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 11:55 +0100
Re: Pattern Search Regular Expression rusi <rustompmody@gmail.com> - 2013-06-15 04:28 -0700
Re: Pattern Search Regular Expression Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 13:41 +0000
Re: Pattern Search Regular Expression Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 13:45 +0000
Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 15:28 +0100
Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 07:31 -0700
Re: Pattern Search Regular Expression Andreas Perstinger <andipersti@gmail.com> - 2013-06-15 17:01 +0200
Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 16:04 +0100
Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 09:28 -0700
Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 17:39 +0100
Re: Pattern Search Regular Expression Terry Reedy <tjreedy@udel.edu> - 2013-06-15 16:24 -0400
Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 11:18 +0100
Re: Pattern Search Regular Expression rurpy@yahoo.com - 2013-06-15 09:59 -0700
Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 10:54 -0700
Re: Pattern Search Regular Expression rurpy@yahoo.com - 2013-06-15 11:47 -0700
Re: Pattern Search Regular Expression subhabangalore@gmail.com - 2013-06-15 12:38 -0700
Re: Pattern Search Regular Expression rurpy@yahoo.com - 2013-06-15 13:41 -0700
Re: Pattern Search Regular Expression Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-15 22:03 +0100
Re: Pattern Search Regular Expression Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 22:26 +0100
csiph-web