On 01/30/2012 07:02 AM, contro opinion wrote:
>>> s1='\x45'
>>> s2='\xe4'
>>> s1+s2
'E\xe4'
>>> print s1+s2
E
why s1+s2 not = '\x45\xe4'??
It is, but '\x45' is ASCII 'E', and '\xe4' is not a printable character:
>>> print '\x45'
E
>>> print '\xe4'
>>>
Try printing s1 and s2 separately i
On 01/30/2012 08:02 AM, contro opinion wrote:
s1='\x45'
s2='\xe4'
s1+s2
'E\xe4'
print s1+s2
E
why s1+s2 not = '\x45\xe4'??
It is. "E" is "\x45". That's plain ASCII and documented everywhere.
--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list
>>> s1='\x45'
>>> s2='\xe4'
>>> s1+s2
'E\xe4'
>>> print s1+s2
E
why s1+s2 not = '\x45\xe4'??
--
http://mail.python.org/mailman/listinfo/python-list