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


Groups > comp.lang.python > #51290

Re: Hello Everyone! A simple questions!

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <bfloriang@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'insert': 0.05; 'interpreter': 0.05; 'assign': 0.07; 'indicated': 0.07; '[0,': 0.09; 'cc:addr:python-list': 0.11; 'inserting': 0.16; 'list)': 0.16; 'subject:questions': 0.16; 'subject:simple': 0.16; '>>>': 0.22; 'email addr:gmail.com&gt;': 0.22; 'handles': 0.22; 'cc:addr:python.org': 0.22; '&gt;&gt;&gt;': 0.24; '(by': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'second': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'lists': 0.32; 'url:python': 0.33; 'created': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'list': 0.37; 'list.': 0.37; 'skip:[ 10': 0.38; 'url:mail': 0.40; 'to:addr:gmail.com': 0.65; 'subject:Hello': 0.72; 'subject:! ': 0.74
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RWufHRyVlDZeyEvzngmTyYQlhBVncE80oykQYIaXQfo=; b=jJYNBMqB9YAtSykxogD3yiIICAOlvHcHzgZdQnfMm8ZmuIt0TatFFZu2HWjD5Ae1Xn AR07/lp+ElirtR+cpTPqJxi9U3PgewNnGCrlAV00u1XMKURYbXWwSe+nDsLyloYorWHw GBQKDeSeuAO5wYynV0mXsxU9a6dfF/1UWr4Qz7xD7/MHXYNgBDCRDTFiKpqk9YUlASxd Oxn337X2eDXdK9KURK+fgAUpfp7UVQQle6ijqRpkBHYRvMcD8brwK4vPbu4YsioKftUd 83fmUXJkkkdXfpfrGRep0amwesuBpgwLE1kiyqSUw5Hv1QIwG1DrBqIzYOcSPQKAvoZu Lb3g==
MIME-Version 1.0
X-Received by 10.112.11.50 with SMTP id n18mr19599340lbb.57.1374816512328; Thu, 25 Jul 2013 22:28:32 -0700 (PDT)
In-Reply-To <CAF0POcuNvJnciWuD4a+CYtJ3XWC+nQZdt0VF08=PD8htKyr_iQ@mail.gmail.com>
References <CAF0POcuNvJnciWuD4a+CYtJ3XWC+nQZdt0VF08=PD8htKyr_iQ@mail.gmail.com>
Date Fri, 26 Jul 2013 07:28:32 +0200
Subject Re: Hello Everyone! A simple questions!
From Florian Baumgartner <bfloriang@gmail.com>
To Thanatos xiao <yanxiaopei199@gmail.com>
Content-Type multipart/alternative; boundary=001a1133fb54d9485404e26369fa
X-Mailman-Approved-At Fri, 26 Jul 2013 11:16:36 +0200
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5137.1374830196.3114.python-list@python.org> (permalink)
Lines 62
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1374830196 news.xs4all.nl 15906 [2001:888:2000:d::a6]:54734
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51290

Show key headers only | 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