## DEV Community is a community of 664,478 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

# Python ASCII to int

Samiur
Developer | Blogger | Learner
Originally published at kodlogs.com ・2 min read

Overview
Convert ASCII to int
Ord ()
Example
ASCII Table
Summary
Tags
Overview
Like other programming languages, Python also uses type conversion. That is, converting one data type to another data type is called type conversion. Our goal is to convert ASCII Table to an integer.

“convert ascii to int python”
In this post we will see what is the method of ascii to int in Python. Friends, if you have read C ++, you must have heard the word ascii. The word ascii is derived from American standard code for information interchange. Used to denote the alphanumeric data type. This coding scheme was introduced by ISO. Now you are worried about what is ISO. It means International Standard Organization. This is a 7 bit coding scheme. This scheme has ASCII code values ​​for different characters. Different codes for "A" and "a" have to be given to anyone who tries to learn it. They get scared and stop learning programming. I think these are very interesting codes. I enjoy working because I know a lot about the number system. The number system gives you data and Information is explained. A set of facts that does not have a clear meaning is called data. And raw data is processed to achieve the desired results. Processed data is called information. The ASCII code represents 256 characters. I will also show you the ASCII Table so that you can understand and you can understand well.We can also convert ascii to integer in Python.

Ord( )

To get the ASCII code of a character, use the ord() function.

``````>>> ord("a") 97
>>> chr(97) 'a'
``````

Example:

``````>>> ord('h')
104
>>> ord('a')
97
>>> ord('^')
94
``````

Digit 0 1 2 3 4 5 6 7 8 9

Decimal 48 49 50 51 52 53 54 55 56 57

Octal 060 061 062 063 064 065 066 067 071 072

Hex 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39

ASCII Table

Summary