Re: String backslash characters

2004-12-24 Thread Leif K-Brooks
PD wrote: Hello, I am new to python, but i am quite curious about the following. suppose you had print '\378' which should not work because \377 is the max. then it displays two characters (an 8 and a heart in my case...). What else does'nt quite make sense is that if this is an octal why is an 8 a

Re: String backslash characters

2004-12-23 Thread Dan Bishop
PD wrote: > Hello, > > I am new to python, but i am quite curious about the following. > > suppose you had > > print '\378' > > which should not work because \377 is the max. then it displays two > characters (an 8 and a heart in my case...). What else does'nt quite > make sense is that if this is

Re: String backslash characters

2004-12-23 Thread Benji York
PD wrote: I am new to python, but i am quite curious about the following. print '\378' which should not work because \377 is the max. then it displays two characters (an 8 and a heart in my case...). What else does'nt quite make sense is that if this is an octal why is an 8 accepted? It would appea

Re: String backslash characters

2004-12-23 Thread Binu K S
'\378' becomes a two character string. The first character is '\37' and the second character is '8'. >>> str = '\378' >>> str[0] '\x1f' >>> str[1] '8' >>> On 23 Dec 2004 20:53:13 -0800, PD <[EMAIL PROTECTED]> wrote: > Hello, > > I am new to python, but i am quite curious about the following. >