joining strings question
- From: patrick.waldo@xxxxxxxxx
- Date: Fri, 29 Feb 2008 07:09:13 -0800 (PST)
Hi all,
I have some data with some categories, titles, subtitles, and a link
to their pdf and I need to join the title and the subtitle for every
file and divide them into their separate groups.
So the data comes in like this:
data = ['RULES', 'title','subtitle','pdf',
'title1','subtitle1','pdf1','NOTICES','title2','subtitle2','pdf','title3','subtitle3','pdf']
What I'd like to see is this:
[RULES', 'title subtitle','pdf', 'title1 subtitle1','pdf1'],
['NOTICES','title2 subtitle2','pdf','title3 subtitle3','pdf'], etc...
I've racked my brain for a while about this and I can't seem to figure
it out. Any ideas would be much appreciated.
Thanks
.
- Follow-Ups:
- Re: joining strings question
- From: baku
- Re: joining strings question
- From: Robert Bossy
- Re: joining strings question
- From: Steve Holden
- Re: joining strings question
- From: Tim Chase
- Re: joining strings question
- From: Bruno Desthuilliers
- Re: joining strings question
- Prev by Date: Re: Python's BNF
- Next by Date: Re: joining strings question
- Previous by thread: why not bisect options?
- Next by thread: Re: joining strings question
- Index(es):
Relevant Pages
|