Two newbie questions
Moshe Zadka
moshez at math.huji.ac.il
Tue Jun 13 14:25:05 EDT 2000
On Tue, 13 Jun 2000, Arkaitz wrote:
> Hi all,
>
> I'm learning Python, as it seems everybody around here :-), and I found two
> problems that I can't find the solution to:
> 1. As the strings are inmutable, if I want to modify the order of the characters
> in the string(e.g. sort them), what I do is:
>
> st = "asdfasfasdf"
> l = []
> for c in st:
> l.append(c)
>
> Then I process the list, and the problem is that I have no idea of how I can get
> the string back, any help?
string.join(['a', 'b', 'c'], '') ==> "abc"
--
Moshe Zadka <moshez at math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com
More information about the Python-list
mailing list