Home > Backend Development > Python Tutorial > What is the chr() function in python

What is the chr() function in python

silencement
Release: 2020-10-12 15:11:36
Original
80445 people have browsed it

What is the chr() function in python

The [chr(i)] function in python is used to return the Unicode character corresponding to the integer i. The parameter i is an integer, and the value range must be [0 - 1114111 (hexadecimal) set to 0x10FFFF)], otherwise a ValueError will be raised.

The function of chr(i) is to return the Unicode character corresponding to the integer i.

For example, chr(97) returns the string a, chr(8364) returns the string €. Its function is the opposite of the ord() function.

Note:

The parameter i is an integer, and the value range must be between 0 - 1114111 (0x10FFFF in hexadecimal), otherwise a ValueError will be raised.

Example:

What is the chr() function in python

Related learning recommendations: python tutorial

The above is the detailed content of What is the chr() function in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template