[Tutor] sort problem

Francesco Loffredo fal at libero.it
Wed Sep 8 19:59:53 CEST 2010


On 08/09/2010 19.12, Roelof Wobben wrote:
> ...
> Oke,
> If I understand it right with join I can put two strings into 1 string.
> Roelof
Not quite. With join you can put together in one string all the elements 
of a list of strings. While you do so, you can also put another string 
as a "wall" between each element of the list. Let's make a little example:

separator = "Roelof"
list = ["Wobben", "Python", "Learner"]
print separator.join(list)

... what you will get? Guess before you try.


Francesco
-------------- next part --------------

Nessun virus nel messaggio in uscita.
Controllato da AVG - www.avg.com 
Versione: 9.0.851 / Database dei virus: 271.1.1/3119 -  Data di rilascio: 09/07/10 08:34:00


More information about the Tutor mailing list