DEV Community

Samiur
Samiur

Posted on • Updated on

Python ASCII to int

Table of contents
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'
Enter fullscreen mode Exit fullscreen mode

Example:

>>> ord('h') 
104 
>>> ord('a') 
97 
>>> ord('^') 
94
Enter fullscreen mode Exit fullscreen mode

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
Today we understand kodlog website, I try to explain how to convert ascii to int in python . I hope after reading this article you will be able to understand the value of ascii. I would like to have feedback from my kodlog site. Please post your feedback, question, or comments about this article.

Tags
C#|Python |Python 3|pycharm |html|java|JavaScript |cpp|code|rubi|Network | Google |html5 |php|bootstrap |string |Microsoft |variable |syntax |Coders |Codinglove|
Computerscience|wordpress|html-page|php|
Xml|game| net| list | loop | integer |float | string | double |

Top comments (0)