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


Groups > comp.lang.python > #51287

Re: Hello Everyone! A simple questions!

References <CAF0POcuNvJnciWuD4a+CYtJ3XWC+nQZdt0VF08=PD8htKyr_iQ@mail.gmail.com> <CAKO8AvHTV0WYrzwOu2vLpV8FjHKZfYydgC_9cj+JKjit_XzLTg@mail.gmail.com>
Date 2013-07-26 14:19 +0800
Subject Re: Hello Everyone! A simple questions!
From Thanatos xiao <yanxiaopei199@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5135.1374819573.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Thanks
I just surprised by three dot


2013/7/26 Florian Baumgartner <bfloriang@gmail.com>

> As alex23 already indicated you created a recursive data-structure (by
> inserting a reference to the list into the second place of the list) and
> the interpreter handles this gracefully by showing [...].
>
> In case you really want to insert the lists members into the second place
> you can assign a copy of the list.
>
> values = [0,1,2]
> values[1] = values[:]
>
>
>
>
>
> 2013/7/26 Thanatos xiao <yanxiaopei199@gmail.com>
>
>> >>> values = [0, 1, 2]>>> values[1] = values>>> values[0, [...], 2]
>>
>> why??
>>
>>
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>>
>

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Hello Everyone! A simple questions! Thanatos xiao <yanxiaopei199@gmail.com> - 2013-07-26 14:19 +0800

csiph-web