xxxxxxxxxx
chr(0x15) + chr(0x07) + chr(0x08) + chr(0x06) + chr(0x27) + chr(0x21) + chr(0x23) + chr(0x15) + chr(0x5c) + chr(0x01) + chr(0x57) + chr(0x2a) + chr(0x17) + chr(0x5e) + chr(0x5f) + chr(0x0d) + chr(0x3b) + chr(0x19) + chr(0x56) + chr(0x5b) + chr(0x5e) + chr(0x36) + chr(0x53) + chr(0x07) + chr(0x51) + chr(0x18) + chr(0x58) + chr(0x05) + chr(0x57) + chr(0x11) + chr(0x3a) + chr(0x56) + chr(0x0e) + chr(0x5d) + chr(0x53) + chr(0x11) + chr(0x54) + chr(0x5c) + chr(0x53) + chr(0x14)
xxxxxxxxxx
c='p'
x=ord(c)
#it will give you the ASCII value stored in x
chr(x)
#it will return back the character
xxxxxxxxxx
asciiValue=ord(stringCharacter)
#example
asciiValue=ord('A')
#in this example asciiValue equals 64
xxxxxxxxxx
# Program to find the ASCII value of the given character
c = 'p'
print("The ASCII value of '" + c + "' is", ord(c))
xxxxxxxxxx
# ASCII stands for American Standard Code for Information Interchange.
# It is a numeric value given to different characters and symbols,
# for computers to store and manipulate.
# Use - ord() function to find this value.
print(ord("A"))
# output: 65
# Keep in mind that capital and simple of the same letter have different values.
print(ord("a"))
# output: 97