how to coerce to a string in Python?

Paul Rubin http
Tue Apr 28 20:44:26 EDT 2009


Mark Tarver <dr.mtarver at ukonline.co.uk> writes:
> 123 --> "1 2 3"

' '.join(str(123))

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

repr([1,2,3])



More information about the Python-list mailing list