Chr, unichr, and ord can be used as character type conversion in Python. here we will talk about the comparison between chr, unichr, and ord character functions in Python, for more information, see chr, unichr, and ord. they can be used as character
The Ord () function is mainly used to return the ASCII code of the corresponding character, and Chr () is used mainly to denote the ASCII code corresponding to the character of his input when the number, can be in decimal or hexadecimal.Example:
Talking about the comparison between chr, unichr, and ord character functions in Python, unichrord
Ord is the abbreviation of unicode ordinal, that is, number.
Chr is the abbreviation of character, that is, the character
Ord and chr convert
Chr (), UNICHR () and Ord ()The CHR () function returns a corresponding character by using an integer (that is, 0~255) within range (256) as a parameter. UNICHR () is just like it, except that the Unicode character is returned, and the parameter
Chr (), unichr (), and ord ()
The chr () function uses a range (0 to 256 ~ 255) an integer is used as a parameter and a corresponding character is returned. Unichr () is the same as it, but only returns Unicode characters. The parameter range of
The CHR () function returns a corresponding character by using an integer (that is, 0~255) within range (256) as a parameter.UNICHR () is just like it, except that the Unicode character is returned, and the parameter range of the UNICHR () added
Chr (), UNICHR () and Ord ()The CHR () function returns a corresponding character by using an integer (that is, 0~255) within range (256) as a parameter. UNICHR () is just like it, except that the Unicode character is returned, and the parameter
Examples of the chr unichr ord function in python, unichrord
Examples of the chr unichr ord function in python
The chr () function uses a range (0 to 256 ~ 255) an integer is used as a parameter and a corresponding character is returned. Unichr ()
The CHR () function uses a range (0 to 256 ~ 255) an integer is used as a parameter and a corresponding character is returned. Unichr () is the same as it, but only returns Unicode characters. The parameter range of unichr () added from Python 2.0
Chr (), UNICHR () and Ord ()The CHR () function returns a corresponding character by using an integer (that is, 0~255) within range (256) as a parameter.UNICHR () is just like it, except that the Unicode character is returned, and the parameter
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.