Is there an meaning of '[[]]' in a list?

Mark Lawrence breamoreboy at yahoo.co.uk
Thu Nov 19 11:26:01 EST 2015


On 19/11/2015 11:28, fl wrote:
> Hi,
> In the previous exercises, I see list:
> cc=[[],[],[]]
>
> Then, I can have this:
>
> ccc=[[[]],[[]],[[]]]
>
> I can also have
>
> ccc[0]
> Out[158]: [[]]
>
> ccc[0]='o'
>
> ccc
> Out[163]: ['o', [[]], [[]]]
>
>
> I have question: Is there any difference between [[]] and []?
> [[]] can have deeper assignment and use than
>
> ccc[0]='o'
>
>
> Thanks,
>

I have question.  Is there any chance that you stop wasting the time of 
people on this list by either doing your own research or trying things 
at an interactive prompt?  Or are you now well past that point, as 
you're learned that the extremely generous people here have fitted your 
bibs, spoon fed you and and changed your nappies so many times that it 
has rendered you incapable of doing anything for yourself?

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

Mark Lawrence




More information about the Python-list mailing list