I am out of trial and error again Lists
breamoreboy at yahoo.co.uk
Wed Oct 22 23:28:04 CEST 2014
On 22/10/2014 21:57, Joel Goldstick wrote:
> On Wed, Oct 22, 2014 at 4:30 PM, Seymore4Head
> <Seymore4Head at hotmail.invalid> wrote:
>> def nametonumber(name):
>> for x,y in enumerate (name):
>> print (lst)
>> return (lst)
>> print (nametonumber(a))#18004382427837
>> The syntax for when to use a () and when to use  still throws me a
> () is tuples which are immutable which means that the items can't be
> changed.  is list which means that each item can be changed.
> Tuples are useful because they can be used as keys in dictionaries and
> are guarantied not to change. Lists are useful because they can be
This is wrong, commas define tuples.
a = 1, 2
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
More information about the Python-list