brain stuck. whats occurring here?

Mark Tolonen mark.e.tolonen at mailinator.com
Thu Feb 7 22:30:55 EST 2008


<Matthew_WARREN at bnpparibas.com> wrote in message 
news:mailman.468.1202405913.9267.python-list at python.org...
> Hallo,
>
> I'm after
>
> [[[],[],[],[],[]],[[],[],[],[],[]],[[],[],[],[],[]],[[],[],[],[],[]],[[],[],[],[],[]]]
>

How about:

>>> [[[]]*5]*5
[[[], [], [], [], []], [[], [], [], [], []], [[], [], [], [], []], [[], [], 
[], [], []], [[], [], [], [], []]]

--Mark




More information about the Python-list mailing list