Daniele Zambelli wrote: > se ho capito bene, la prima parte del tuo problema รจ trasformare la > stringa: > "03ff55a600" > > nella stringa: > "\x03\xff\x55\xa6\x00"
>>> s = '03ff55a600' >>> ''.join([chr(int(t[0]+t[1], 16)) for t in zip(s[:-1:2], s[1::2])]) '\x03\xffU\xa6\x00' >>> '\x55' 'U' -- Nicola Larosa - http://www.tekNico.net/ Legally or otherwise, domestically or from overseas, flawless copies can and will be obtained. And the modern European pirates who retrieve and share our cultural gold - gold that the owners had forsaken - are not scoundrels who defy the law but heroes who advance its ultimate aim. -- Peter Guttman, July 2006
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python