On 08/09/2010 19.12, Francesco Loffredo wrote:
...
a little example:

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

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

There's more, I forgot to add:

print separator

This is important, this method *returns* a *NEW* string, it does not modify the providing string (here separator)! This means you must save the result somewhere, if you want to use it later:

together = separator.join(list)

Francesco
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
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to