How to add type "int" to string ?

simonb at webone.com.au simonb at webone.com.au
Sun Jul 15 10:07:18 EDT 2001


 >>> "hello world"+chr(0x00)
'hello world\000'

is that what you wanted?

shuibo wrote:

>Hello all :
>in my program I want to give a char variable a Hex value , for example :
>a = "Hello World"
>a = a + 0x00
>but it display "cannot add type int to string"
>what can I do ?
>thanks very very much !
>




More information about the Python-list mailing list