Jia Lu wrote:
> Hi all
> 
>  I have a list like:
> 
>>>> list
> [1, 2, 3]
>>>> list[1:]
> [2, 3]
> 
> I want to get a string "2 3"
> 
>>>> str(list[1:])
> '[2, 3]'
> 
> How can I do that ?
> 

" ".join(str(x) for x in list)


-Travis

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to