Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'list?': 0.07; 'string': 0.09; 'builtin': 0.09; 'input,': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Help': 0.11; 'stored': 0.12; 'question.': 0.14; 'bumping': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'storing': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'integer': 0.24; 'url:moin': 0.24; 'least': 0.26; 'header:X-Complaints-To:1': 0.27; '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; 'url:org': 0.36; 'list.': 0.37; 'handle': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'read': 0.60; 'url:3': 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-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Help Date: Mon, 01 Apr 2013 23:29:09 +0100 References: <758c0049-1bde-46de-a331-be3343618599@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-92-18-43-197.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <758c0049-1bde-46de-a331-be3343618599@googlegroups.com> X-Antivirus: avast! (VPS 130401-1, 01/04/2013), Outbound message X-Antivirus-Status: Clean 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: , Newsgroups: comp.lang.python Message-ID: Lines: 51 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364855329 news.xs4all.nl 6961 [2001:888:2000:d::a6]:52408 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42516 On 01/04/2013 23:12, khaosyt@gmail.com wrote: > On Monday, April 1, 2013 6:09:04 PM UTC-4, Mark Lawrence wrote: >> On 01/04/2013 22:42, khaosyt@gmail.com wrote: >> >>> Self-bump >> >>> >> >> >> >> It's considered polite to wait for at least 24 hours before bumping a >> >> question. You might have got more answers if you'd given a decent >> >> subject line rather than "Help". >> >> >> >> As it happens all you need do is loop around the string that is input, >> >> converting every digit to an integer and storing them in a list, then >> >> call the builtin sum function against the stored list. >> >> >> >> You'll probably also need a try/except to handle any duff input. >> >> >> >> -- >> >> If you're using GoogleCrap™ please read this >> >> http://wiki.python.org/moin/GoogleGroupsPython. >> >> >> >> Mark Lawrence > > How do I go about storing them in a list? > Read this http://docs.python.org/3/tutorial/introduction.html#lists -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence