Forcing type conversion

Scott kain at cableadmin.com
Wed May 17 10:23:35 EDT 2000


Hi Dale,

Try:

`a` + ":" + `b`
str(a) + ":" + str(b)
"%d:%d" % (a, b)

etc, etc

-Scott

In article <8fu9m9$2ab$1 at supernews.com>, Dale Strickland-Clark wrote:
>How do I get Python to force 'a' and 'b' into strings so that the following
>concatenates instead of trying to add.
>
>a = 1
>b = 2
>a + ":" + b
>
>Thanks
>
>--
>Dale Strickland-Clark
>Out-Think Ltd, UK
>Business Technology Consultants
>
>
>



More information about the Python-list mailing list