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
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
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
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
___
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___
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