How to convert this list to string?

Theerasak Photha hanumizzle at gmail.com
Wed Oct 18 03:28:06 EDT 2006


On 18 Oct 2006 00:20:50 -0700, Jia Lu <Roka100 at gmail.com> wrote:

> I want to get a string "2 3"
>
> >>> str(list[1:])
> '[2, 3]'
>
> How can I do that ?

' '.join(str(i) for i in list[1:])

-- Theerasak



More information about the Python-list mailing list