"Daniel" <asmosis.aste...@gmail.com> wrote
I stumbled into lists of words and lists of characters. I have no
explications in that book for those two and I didn't found some explications
on the web.
aListOfWords = ['one','word','or','many']
aListOfCharacters = ['a','s','d','f']
aStringOfCharacters = 'asdf'
aWord = aStringOfCharacters
Now what part do you not understand?
Could you point me to a link or something where I can read about
them? I don't seem to understand why they are used.
You use a list of words any time you want to process multiple words.
For example a spelling checker may break a document into a list
of words and compare each word to a reference list of correctly
spelled words.
A list of characters is rarely used in Python since you can use
a string in almost every case.
You will find some more information in the "Raw Materials" topic
of my tutorial.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor