Lists into Strings..?
mjackson at wrc.xerox.com
Wed Aug 29 22:09:08 CEST 2001
tefol at This.Is.Not.An.Address (tefol) writes:
> I am wondering of the best* way to make string equal to an entire list of
> >>> lExistingList = ['spam','Spam','SPAM','bacon','Bacon']
> >>> sNewString = lExistingList
> just doesn't seem to do it.
>>> lExistingList = ['spam','Spam','SPAM','bacon','Bacon']
>>> sNewString = "".join(lExistingList)
>>> print sNewString
what you were looking for?
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
Don't talk to the crazy people on the street, even though
they may seem fun to be with.
- /CityPack, New York/ Chinese language edition (1996)
More information about the Python-list