Converting a list to a string
Daniel Klein
DanielK at aracnet.com
Tue Dec 19 14:46:26 EST 2000
More information about the Python-list mailing list
Tue Dec 19 14:46:26 EST 2000
- Previous message (by thread): Converting a list to a string
- Next message (by thread): python with VB/Delphi
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
My application needs to be able to convert a list to a string and vice
versa. Taking the first problem, the best I could come up with is
s = ''
for i in range(len(mylist)):
s += mylist[i]
Of course, I would turn this into a function (or better yet a class method).
Is here a builtin function to do this that I'm missing? Or is this as good
as it can get?
Thanks,
Daniel Klein
- Previous message (by thread): Converting a list to a string
- Next message (by thread): python with VB/Delphi
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list