how to make a nested list
Stef Mientki
stef.mientki at gmail.com
Thu Sep 15 12:57:24 EDT 2011
More information about the Python-list mailing list
Thu Sep 15 12:57:24 EDT 2011
- Previous message (by thread): help regarding extracting a smaller list from larger one
- Next message (by thread): how to make a nested list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hello, I need a nested list, like this >>> A= [ [None,None], [None,None], [None, None] ] >>> A[2][0] =77 >>> A [[None, None], [None, None], [77, None]] Because the list is much larger, I need a shortcut (ok I can use a for loop) So I tried >>> B = 3 * [ [ None, None ]] >>> B[2][0] = 77 >>> B [[77, None], [77, None], [77, None]] which doesn't work as expected. any suggestions ? thanks, Stef
- Previous message (by thread): help regarding extracting a smaller list from larger one
- Next message (by thread): how to make a nested list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list