Skip to main content

ASCII

ASCII is short for American Standard Code for Information Interchange.

It basically means representing alphabets as numbers for easier use.

ASCII encodes all the alphabets and special characters with numbers from 0 to 127.

ord()

To find the ASCII value of a character, use ord().

ord('a')
# 97

You can only put in one character at a time.

If you want to find the ASCII value of a sentence, use the for loop. :::

chr()

To find the character from the ASCII value, use chr().

chr(97)
# 'a'

import Quiz from 'react-quiz-component';