Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'list?': 0.07; 'string': 0.09; 'builtin': 0.09; 'input,': 0.09; 'lawrence': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.11; 'subject:Help': 0.11; 'stored': 0.12; 'question.': 0.14; 'bumping': 0.16; 'storing': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'integer': 0.24; 'url:moin': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'converting': 0.30; 'url:wiki': 0.31; 'probably': 0.32; 'url:python': 0.33; 'monday,': 0.33; 'received:google.com': 0.35; 'url:org': 0.36; 'list.': 0.37; 'handle': 0.38; 'list,': 0.38; 'rather': 0.38; 'how': 0.40; 'read': 0.60; 'from:no real name:2**0': 0.61; "you're": 0.61; "you'll": 0.62; 'email addr:gmail.com': 0.63; 'sum': 0.64; 'more': 0.64; 'charset:windows-1252': 0.65; 'hours': 0.66; 'subject': 0.69; '2013': 0.98 X-Received: by 10.50.16.71 with SMTP id e7mr975391igd.14.1364854340312; Mon, 01 Apr 2013 15:12:20 -0700 (PDT) Newsgroups: comp.lang.python Date: Mon, 1 Apr 2013 15:12:20 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=74.109.22.141; posting-account=4W7nAAoAAABhu6jqNF1_LLkqm6-ij3Cw References: User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 74.109.22.141 MIME-Version: 1.0 Subject: Re: Help From: khaosyt@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364854348 news.xs4all.nl 6884 [2001:888:2000:d::a6]:38891 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42512 On Monday, April 1, 2013 6:09:04 PM UTC-4, Mark Lawrence wrote: > On 01/04/2013 22:42, khaosyt@gmail.com wrote: >=20 > > Self-bump >=20 > > >=20 >=20 >=20 > It's considered polite to wait for at least 24 hours before bumping a=20 >=20 > question. You might have got more answers if you'd given a decent=20 >=20 > subject line rather than "Help". >=20 >=20 >=20 > As it happens all you need do is loop around the string that is input,=20 >=20 > converting every digit to an integer and storing them in a list, then=20 >=20 > call the builtin sum function against the stored list. >=20 >=20 >=20 > You'll probably also need a try/except to handle any duff input. >=20 >=20 >=20 > --=20 >=20 > If you're using GoogleCrap=99 please read this=20 >=20 > http://wiki.python.org/moin/GoogleGroupsPython. >=20 >=20 >=20 > Mark Lawrence How do I go about storing them in a list?