YouTip LogoYouTip

Python Func Chr

# Python2.x Python chr() Function [![Image 3: Python Built-in Functions](#) Python Built-in Functions](#) * * * ## Description The `chr()` function takes an integer in the range of `range(256)` (i.e., 0 to 255) as an argument and returns the corresponding character. ### Syntax Here is the syntax for the `chr()` method: chr(i) ### Parameters * i -- This can be a number in either decimal or hexadecimal form. ### Return Value The return value is the ASCII character corresponding to the given integer. * * * ## Examples The following examples demonstrate the use of the `chr()` method: >>>print chr(0 x30), chr(0 x31), chr(0 x61)# Hexadecimal 0 1 a>>>print chr(48), chr(49), chr(97)# Decimal 0 1 a [![Image 4: Python Built-in Functions](#) Python Built-in Functions](#)
← Python Func StrPython Func Int β†’