Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:error': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'syntax': 0.04; 'item.': 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; 'throws': 0.09; 'def': 0.12; 'language.': 0.14; '"a"': 0.16; 'curve.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'print': 0.22; 'header:User-Agent:1': 0.23; "i've": 0.25; 'header:X-Complaints- To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'character': 0.29; 'another': 0.32; 'but': 0.35; 'list': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'helps': 0.61; 'subject: ': 0.61; "you've": 0.63; 'skip:n 10': 0.64; 'our': 0.64; 'charset:windows-1252': 0.65; 'url:tinyurl': 0.69; 'subject:Lists': 0.91; 'numerous': 0.93; 'responses': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: I am out of trial and error again Lists Date: Fri, 24 Oct 2014 09:12:28 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-178-133.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414138362 news.xs4all.nl 2967 [2001:888:2000:d::a6]:47465 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79562 On 24/10/2014 08:05, Mark Lawrence wrote: > On 22/10/2014 21:30, Seymore4Head wrote: >> def nametonumber(name): >> lst=[""] >> for x,y in enumerate (name): >> lst=lst.append(y) >> print (lst) >> return (lst) >> a=["1-800-getcharter"] >> print (nametonumber(a))#18004382427837 >> >> >> The syntax for when to use a () and when to use [] still throws me a >> curve. >> >> For now, I am trying to end up with a list that has each character in >> "a" as a single item. >> >> I get: >> None >> None >> > > Following on from the numerous responses you've had here, I've no idea > if this helps your thought processes but there's only one way for you to > find out http://www.greenteapress.com/thinkpython/ :) > And another http://tinyurl.com/k26vjhr -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence