Park Avenue None
-Original Message-
From: Erik
Sent: Wednesday, February 24, 2016 4:28 PM
To: grsm...@atlanticbb.net ; python-list
Subject: Re: Nested List question
On 24/02/16 20:59, grsm...@atlanticbb.net wrote:
Can you have a phython list like:
['George',
'Soros'
On 24/02/2016 20:59, grsm...@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
On 24/02/16 20:59, grsm...@atlanticbb.net wrote:
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.
you can indeed have a nested list. One way you could do that looks like
donor = [
'George',
'Soros',
[ #<- 2nd element of outermost list
'99 First Street',
[ #<- 1st element of middling list
'33 Broadway Av
On 2016-02-24, 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']
Sure:
$ python3
Python 3.4.3 (default, Feb 12 2016, 15:58:12)
[GCC 4.9.3] on linux
Type "help", "c
Roman Suzi <[EMAIL PROTECTED]> writes:
> On Thu, 3 Nov 2005, Chris McCoy wrote:
>>> gridSystemId = [[None]*columns]*rows
>> You've made gridSystemID a list of `rows` references to the SAME "inner"
>> list, so the behavior you observe is the only possible one.
>> If you want copies instead, ASK for
"Newsfeeds" <[EMAIL PROTECTED]> wrote:
> Could anyone tell me why this code produces the output it does?
http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list
has the full story.
--
http://mail.python.org/mailman/listinfo/python-list
It may, but I haven't been using Pychecker yet. I'm still fairly new to
Python.
Thanks,
Chris M.
"Roman Suzi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 3 Nov 2005, Chris McCoy wrote:
>
>> Thank you! I've been banging my head against the wall!
>>
>> Chris M.
>
>>> g
On Thu, 3 Nov 2005, Chris McCoy wrote:
> Thank you! I've been banging my head against the wall!
>
> Chris M.
>> gridSystemId = [[None]*columns]*rows
>
> You've made gridSystemID a list of `rows` references to the SAME "inner"
> list, so the behavior you observe is the only possible one.
>
> If y
Thank you! I've been banging my head against the wall!
Chris M.
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Newsfeeds <[EMAIL PROTECTED]> wrote:
>
>> Hello All,
>>
>> Could anyone tell me why this code produces the output it does?
> ...
>> gridSystemId = [[
Newsfeeds <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> Could anyone tell me why this code produces the output it does?
...
> gridSystemId = [[None]*columns]*rows
You've made gridSystemID a list of `rows` references to the SAME "inner"
list, so the behavior you observe is the only possible on
11 matches
Mail list logo