how to coerce to a string in Python?

Paul Rubin http
Wed Apr 29 02:44:26 CEST 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