I am out of trial and error again Lists

Seymore4Head Seymore4Head at Hotmail.invalid
Wed Oct 22 16:30:37 EDT 2014


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



More information about the Python-list mailing list