How to add type "int" to string ?

Uwe Hoffmann nospam at nospam.de
Sun Jul 15 09:40:14 EDT 2001


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 !


a = a + chr(0x00)

if that's what you want ?



More information about the Python-list mailing list