Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:help': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'structure,': 0.09; 'block.': 0.16; 'condensed': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'header :User-Agent:1': 0.23; 'error': 0.23; 'code:': 0.26; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'errors': 0.30; 'code': 0.31; 'probably': 0.32; 'could': 0.34; 'subject:with': 0.35; 'should': 0.36; 'list': 0.37; 'nov': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'subject:this': 0.83; 'imran': 0.84; 'received:108': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: Please help with this Date: Wed, 13 Nov 2013 00:45:02 -0600 References: <6ade7311-fe93-4747-959b-e9b947714b00@googlegroups.com> <6ade7311-fe93-4747-959b-e9b947714b00@googlegroups.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: pool-108-12-92-40.hstntx.dsl-w.verizon.net In-Reply-To: <6ade7311-fe93-4747-959b-e9b947714b00@googlegroups.com> User-Agent: Groundhog Newsreader for Android 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384325096 news.xs4all.nl 16001 [2001:888:2000:d::a6]:33363 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59287 On Tue, 12 Nov 2013 20:18:58 -0800 (PST), saad imran wrote: > Could you point out any errors in my code: > que1 = "4481 *2" > ans1 = "8962" > que2 = "457 * 21" > ans2 = "9597" These values should all be in a single named structure, probably a list of tuples. Then all that duplicated code could be condensed into a single block. Is that the error you wanted us to find? -- DaveA