Re: [Tutor] get a character of an ascii-value

2006-03-29 Thread Keo Sophon
On Thursday 30 March 2006 01:25, Hugo González Monteverde wrote: > Hi, > > Python strings are binary strings as they can contain any value, > including 0 (NULL) Depending on the encoding of the string, this may or > may not be printable, and characters over ASCII 127 will mean different > letters a

Re: [Tutor] get a character of an ascii-value

2006-03-29 Thread Hugo González Monteverde
Hi, Python strings are binary strings as they can contain any value, including 0 (NULL) Depending on the encoding of the string, this may or may not be printable, and characters over ASCII 127 will mean different letters and symbols. Check the docs for strings and encodings: http://docs.pytho

Re: [Tutor] get a character of an ascii-value

2006-03-28 Thread Keo Sophon
On Wednesday 29 March 2006 13:54, Keo Sophon wrote: > Hi all, > > I wonder how to get a character of an Ascii-value. For example, i have r = > 37. So i wanna print the character of 37. Is there any function? > > Thanks, > Sophon I just got the answer from Pujo. How about r is bigger than 127. How

Re: [Tutor] get a character of an ascii-value

2006-03-28 Thread Hugo González Monteverde
Keo Sophon wrote: > Hi all, > > I wonder how to get a character of an Ascii-value. For example, i have r = > 37. So i wanna print the character of 37. Is there any function? > Hi ..yeah, it's called chr(), and its opposite is ord() >>> ord('r') 114 >>> chr(114) 'r' >>> Hugo ___

Re: [Tutor] get a character of an ascii-value

2006-03-28 Thread Pujo Aji
Hello use this function:    print ord('a')    print chr(97)Cheers,pujoOn 3/29/06, Keo Sophon < [EMAIL PROTECTED]> wrote:Hi all,I wonder how to get a character of an Ascii-value.  For example, i have r = 37. So i wanna print the character of 37. Is there any function?Thanks,Sophon___

[Tutor] get a character of an ascii-value

2006-03-28 Thread Keo Sophon
Hi all, I wonder how to get a character of an Ascii-value. For example, i have r = 37. So i wanna print the character of 37. Is there any function? Thanks, Sophon ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor