array of class

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Tue Jan 2 18:22:35 EST 2007


George Sakkis a écrit :
> Bruno Desthuilliers wrote:
> 
(snip)
>>words = []
>>for w in ['this', 'is', 'probably', 'what', 'you', 'want']:
>>   words.append(Word(w))
>>print words 
> 
> Or more compactly:
> 
> words = [Word(w) for w in 'this is probably what you want'.split()]
> print words

I didn't want to introduce yet some more "confusing" stuff !-)



More information about the Python-list mailing list