Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19600

Re: add two strings

Date 2012-01-30 08:23 -0500
From Dave Angel <d@davea.name>
Subject Re: add two strings
References <CA+YdQ_6cp=9dQ65P3TTNTJLG54stCiX9x1RNSV=4akVQQKUTFw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5214.1327929840.27778.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: add two strings Dave Angel <d@davea.name> - 2012-01-30 08:23 -0500

csiph-web