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


Groups > comp.lang.python > #51290

Re: Hello Everyone! A simple questions!

References <CAF0POcuNvJnciWuD4a+CYtJ3XWC+nQZdt0VF08=PD8htKyr_iQ@mail.gmail.com>
Date 2013-07-26 07:28 +0200
Subject Re: Hello Everyone! A simple questions!
From Florian Baumgartner <bfloriang@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5137.1374830196.3114.python-list@python.org> (permalink)

Show all headers | View raw


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

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! Florian Baumgartner <bfloriang@gmail.com> - 2013-07-26 07:28 +0200

csiph-web