How to convert this list to string?

Fredrik Lundh fredrik at pythonware.com
Wed Oct 18 03:53:17 EDT 2006


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 ?

     http://effbot.org/zone/python-list.htm#printing

</F>




More information about the Python-list mailing list