[Tutor] sort problem
Roelof Wobben
rwobben at hotmail.com
Wed Sep 8 20:16:48 CEST 2010
Date: Wed, 8 Sep 2010 20:10:28 +0200
From: fal at libero.it
To: tutor at python.org
Subject: Re: [Tutor] sort problem
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
_______________________________________________ Tutor maillist - Tutor at python.org To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Oke,
I now see what everyone try to teach me.
Roelof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100908/6c2bbf2b/attachment.html>
More information about the Tutor
mailing list