chr()

chr() : Getting Char using Unicode point value as input

Input : takes Unicode point value as input .
returns the equivalent char

Here are some sample outputs of Unicode point value as input ( output is shown against each row after comment )
print(chr(97)) # a
print(chr(98)) # b
print(chr(80)) # P
print(chr(35)) # #
print(chr(36)) # $
The first 128 unicode point values are same as ASCII values.

We can use inputs from 0 to 1114111.

Here is for loop to print some chars with their Unicode point values (Unicode value as inputs). Change the range values to get different set of chars and values.
for i in range(200,250):
    print(i,":",chr(i))
All Built in Functions in Python
ord() returns the Unicode point value by taking the Char as input ascii()


plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer