I am out of trial and error again Lists
Seymore4Head
Seymore4Head at Hotmail.invalid
Fri Oct 24 10:48:26 EDT 2014
On Fri, 24 Oct 2014 09:12:28 +0100, Mark Lawrence
<breamoreboy at yahoo.co.uk> wrote:
>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
Google. I have heard of that. :)
More information about the Python-list
mailing list