Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103465 > unrolled thread

Re: Nested List question

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2016-02-24 21:38 +0000
Last post2016-02-24 21:38 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Nested List question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-24 21:38 +0000

#103465 — Re: Nested List question

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2016-02-24 21:38 +0000
SubjectRe: Nested List question
Message-ID<mailman.108.1456349924.20994.python-list@python.org>
On 24/02/2016 20:59, grsmith@atlanticbb.net wrote:
> All,
>
> Can you have a phython list like:
> ['George',
> 'Soros',
> ['99 First Street',
>    '33 Broadway Avenue', ['Apt 303'],
>    '1 Park Avenue'],
>    'New York', 'NY']
>
> In other words how do you correctly nest the
> ['Apt 303'] so it goes with 33 Broadway Avenue.
>
> Also, I tried several ways and could not figure out
> how to get the ['Apt 303'] out of the list. How can
> you do that. It is the ['Apt 303'] that is the problem,
> I know how to do the other elements.
>
> thanks
> George
>

As you've all ready had answers, I'd simply ask is a list the best data 
structure for your application?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web