Mark Tarver wrote:
On 28 Apr, 19:58, Mark Tarver <dr.mtar...@ukonline.co.uk> wrote:
How do you coerce an object to a string in Python?

123 --> "1 2 3"
[1,2,3] -> "[1,2,3]" etc

Ah , 'str' a pure guess but it worked.

You may also be interested in the repr() function. I'm afraid neither will give you

  123 --> "1 2 3"

but will give you "123" instead.

-tkc




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

Reply via email to