Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26881
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <woooee@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'wiki': 0.03; 'python': 0.09; 'friday,': 0.09; 'integers': 0.09; 'mutable': 0.09; 'subject:into': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr :python-list': 0.10; 'suggest': 0.11; 'container.': 0.16; 'dictionary,': 0.16; 'wrote:': 0.17; 'are.': 0.22; 'cc:2**0': 0.23; 'example': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'print': 0.32; 'page.': 0.33; 'tutorial': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'from:no real name:2**0': 0.60; 'subject:....': 0.65; 'august': 0.66; 'received:209.85.213.184': 0.91; 'received:mail-yx0-f184.google.com': 0.91 |
| Newsgroups | comp.lang.python |
| Date | Fri, 10 Aug 2012 10:04:41 -0700 (PDT) |
| In-Reply-To | <mailman.3166.1344612712.4697.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=24.205.92.198; posting-account=SzBqHAoAAADKifu1YcFgQTQPM3B3Qww3 |
| References | <50251477.7010507@googlemail.com> <CAPTjJmpB-LiL=+WURP8O6Y=39CYtKuq_zVyVMsWv4qQdmEZFrw@mail.gmail.com> <mailman.3166.1344612712.4697.python-list@python.org> |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-IP | 24.205.92.198 |
| MIME-Version | 1.0 |
| Subject | Re: dictionary into desired variable.... |
| From | woooee@gmail.com |
| To | comp.lang.python@googlegroups.com |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| 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> |
| Message-ID | <mailman.3169.1344618284.4697.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1344618284 news.xs4all.nl 6860 [2001:888:2000:d::a6]:47971 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:26881 |
Show key headers only | View raw
On Friday, August 10, 2012 8:31:48 AM UTC-7, Tamer Higazi wrote: > let us say a would be x = [2,5,4] > > y = a[3] > > if I change y to [] > > I want the result to be x = [2,5,[]] and that's automaticly There is no such thing as a[3] if a=[2,4,5]. And this is a list not a dictionary, so I would suggest a tutorial from the Python wiki page. You have to use a mutable container. Integers are not mutable. Lists, for example are. y=[4] x = [2,5,y] print x y[0]=10 print x
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: dictionary into desired variable.... Tamer Higazi <th982a@googlemail.com> - 2012-08-10 17:31 +0200 Re: dictionary into desired variable.... woooee@gmail.com - 2012-08-10 10:04 -0700 Re: dictionary into desired variable.... woooee@gmail.com - 2012-08-10 10:04 -0700
csiph-web