ASCII Table in Python | In this post, we will develop a Python program to print the ASCII table using the chr() function. **ASCII** stands for **American Standard Code** for Information Interchange. It was developed by the **ANSI (American National Standards Institute)** and it is used to interchange the information from a high-level language to low-level language. Machine or Computer understand only binary languages. So, the character data type represents integers. For example, the ASCII value of the letter ‘A’ is 65.

ASCII value ranges from **0 to 255** in Decimal or **00 to FF** in Hexadecimal. ASCII codes can be divided into two sets – Standard ASCII codes and Extended ASCII codes. Standard ASCII codes range from **0 to 127** in Decimal or **00 to 7F** in Hexadecimal, they are mainly used for representing characters, While ASCII only encodes 128 characters, the **current Unicode** has more than **100,000 characters **from hundreds of scripts.

## ASCII Table in Python

In Python, we can use the **chr() function** to convert the ASCII value to the character, which is a built-in function that accepts a specified **Unicode** (ASCII value) as an argument and returns the character. The ASCII table will contain an ASCII value with its associated character, which will be displayed through Python language.

Python Program to Display ASCII Table

```
# Python program to print ASCII table
# print ASCII table from 0 to 255
for i in range(256):
ch = chr(i)
print('ASCII value of', i, 'is =', ch)
```

Output for the above python program to display ASCII table:-

ASCII value of 0 is =

ASCII value of 1 is =

ASCII value of 2 is =

ASCII value of 3 is =

ASCII value of 4 is =

ASCII value of 5 is =

ASCII value of 6 is =

ASCII value of 7 is =

ASCII value of 8 is =

ASCII value of 9 is =

ASCII value of 10 is =

ASCII value of 11 is =

ASCII value of 12 is =

ASCII value of 13 is =

ASCII value of 14 is =

ASCII value of 15 is =

ASCII value of 16 is =

ASCII value of 17 is =

ASCII value of 18 is =

ASCII value of 19 is =

ASCII value of 20 is =

ASCII value of 21 is =

ASCII value of 22 is =

ASCII value of 23 is =

ASCII value of 24 is =

ASCII value of 25 is =

ASCII value of 26 is =

ASCII value of 27 is =

ASCII value of 28 is =

ASCII value of 29 is =

ASCII value of 30 is =

ASCII value of 31 is =

ASCII value of 32 is =

ASCII value of 33 is = !

ASCII value of 34 is = “

ASCII value of 35 is = #

ASCII value of 36 is = $

ASCII value of 37 is = %

ASCII value of 38 is = &

ASCII value of 39 is = ‘

ASCII value of 40 is = (

ASCII value of 41 is = )

ASCII value of 42 is = *

ASCII value of 43 is = +

ASCII value of 44 is = ,

ASCII value of 45 is = –

ASCII value of 46 is = .

ASCII value of 47 is = /

ASCII value of 48 is = 0

ASCII value of 49 is = 1

ASCII value of 50 is = 2

ASCII value of 51 is = 3

ASCII value of 52 is = 4

ASCII value of 53 is = 5

ASCII value of 54 is = 6

ASCII value of 55 is = 7

ASCII value of 56 is = 8

ASCII value of 57 is = 9

ASCII value of 58 is = :

ASCII value of 59 is = ;

ASCII value of 60 is = <

ASCII value of 61 is = =

ASCII value of 62 is = >

ASCII value of 63 is = ?

ASCII value of 64 is = @

ASCII value of 65 is = A

ASCII value of 66 is = B

ASCII value of 67 is = C

ASCII value of 68 is = D

ASCII value of 69 is = E

ASCII value of 70 is = F

ASCII value of 71 is = G

ASCII value of 72 is = H

ASCII value of 73 is = I

ASCII value of 74 is = J

ASCII value of 75 is = K

ASCII value of 76 is = L

ASCII value of 77 is = M

ASCII value of 78 is = N

ASCII value of 79 is = O

ASCII value of 80 is = P

ASCII value of 81 is = Q

ASCII value of 82 is = R

ASCII value of 83 is = S

ASCII value of 84 is = T

ASCII value of 85 is = U

ASCII value of 86 is = V

ASCII value of 87 is = W

ASCII value of 88 is = X

ASCII value of 89 is = Y

ASCII value of 90 is = Z

ASCII value of 91 is = [

ASCII value of 92 is = \

ASCII value of 93 is = ]

ASCII value of 94 is = ^

ASCII value of 95 is = _

ASCII value of 96 is = `

ASCII value of 97 is = a

ASCII value of 98 is = b

ASCII value of 99 is = c

ASCII value of 100 is = d

ASCII value of 101 is = e

ASCII value of 102 is = f

ASCII value of 103 is = g

ASCII value of 104 is = h

ASCII value of 105 is = i

ASCII value of 106 is = j

ASCII value of 107 is = k

ASCII value of 108 is = l

ASCII value of 109 is = m

ASCII value of 110 is = n

ASCII value of 111 is = o

ASCII value of 112 is = p

ASCII value of 113 is = q

ASCII value of 114 is = r

ASCII value of 115 is = s

ASCII value of 116 is = t

ASCII value of 117 is = u

ASCII value of 118 is = v

ASCII value of 119 is = w

ASCII value of 120 is = x

ASCII value of 121 is = y

ASCII value of 122 is = z

ASCII value of 123 is = {

ASCII value of 124 is = |

ASCII value of 125 is = }

ASCII value of 126 is = ~

ASCII value of 127 is =

ASCII value of 128 is =

ASCII value of 129 is =

ASCII value of 130 is =

ASCII value of 131 is =

ASCII value of 132 is =

ASCII value of 133 is =

ASCII value of 134 is =

ASCII value of 135 is =

ASCII value of 136 is =

ASCII value of 137 is =

ASCII value of 138 is =

ASCII value of 139 is =

ASCII value of 140 is =

ASCII value of 141 is =

ASCII value of 142 is =

ASCII value of 143 is =

ASCII value of 144 is =

ASCII value of 145 is =

ASCII value of 146 is =

ASCII value of 147 is =

ASCII value of 148 is =

ASCII value of 149 is =

ASCII value of 150 is =

ASCII value of 151 is =

ASCII value of 152 is =

ASCII value of 153 is =

ASCII value of 154 is =

ASCII value of 155 is =

ASCII value of 156 is =

ASCII value of 157 is =

ASCII value of 158 is =

ASCII value of 159 is =

ASCII value of 160 is =

ASCII value of 161 is = ¡

ASCII value of 162 is = ¢

ASCII value of 163 is = £

ASCII value of 164 is = ¤

ASCII value of 165 is = ¥

ASCII value of 166 is = ¦

ASCII value of 167 is = §

ASCII value of 168 is = ¨

ASCII value of 169 is = ©

ASCII value of 170 is = ª

ASCII value of 171 is = «

ASCII value of 172 is = ¬

ASCII value of 173 is =

ASCII value of 174 is = ®

ASCII value of 175 is = ¯

ASCII value of 176 is = °

ASCII value of 177 is = ±

ASCII value of 178 is = ²

ASCII value of 179 is = ³

ASCII value of 180 is = ´

ASCII value of 181 is = µ

ASCII value of 182 is = ¶

ASCII value of 183 is = ·

ASCII value of 184 is = ¸

ASCII value of 185 is = ¹

ASCII value of 186 is = º

ASCII value of 187 is = »

ASCII value of 188 is = ¼

ASCII value of 189 is = ½

ASCII value of 190 is = ¾

ASCII value of 191 is = ¿

ASCII value of 192 is = À

ASCII value of 193 is = Á

ASCII value of 194 is = Â

ASCII value of 195 is = Ã

ASCII value of 196 is = Ä

ASCII value of 197 is = Å

ASCII value of 198 is = Æ

ASCII value of 199 is = Ç

ASCII value of 200 is = È

ASCII value of 201 is = É

ASCII value of 202 is = Ê

ASCII value of 203 is = Ë

ASCII value of 204 is = Ì

ASCII value of 205 is = Í

ASCII value of 206 is = Î

ASCII value of 207 is = Ï

ASCII value of 208 is = Ð

ASCII value of 209 is = Ñ

ASCII value of 210 is = Ò

ASCII value of 211 is = Ó

ASCII value of 212 is = Ô

ASCII value of 213 is = Õ

ASCII value of 214 is = Ö

ASCII value of 215 is = ×

ASCII value of 216 is = Ø

ASCII value of 217 is = Ù

ASCII value of 218 is = Ú

ASCII value of 219 is = Û

ASCII value of 220 is = Ü

ASCII value of 221 is = Ý

ASCII value of 222 is = Þ

ASCII value of 223 is = ß

ASCII value of 224 is = à

ASCII value of 225 is = á

ASCII value of 226 is = â

ASCII value of 227 is = ã

ASCII value of 228 is = ä

ASCII value of 229 is = å

ASCII value of 230 is = æ

ASCII value of 231 is = ç

ASCII value of 232 is = è

ASCII value of 233 is = é

ASCII value of 234 is = ê

ASCII value of 235 is = ë

ASCII value of 236 is = ì

ASCII value of 237 is = í

ASCII value of 238 is = î

ASCII value of 239 is = ï

ASCII value of 240 is = ð

ASCII value of 241 is = ñ

ASCII value of 242 is = ò

ASCII value of 243 is = ó

ASCII value of 244 is = ô

ASCII value of 245 is = õ

ASCII value of 246 is = ö

ASCII value of 247 is = ÷

ASCII value of 248 is = ø

ASCII value of 249 is = ù

ASCII value of 250 is = ú

ASCII value of 251 is = û

ASCII value of 252 is = ü

ASCII value of 253 is = ý

ASCII value of 254 is = þ

ASCII value of 255 is = ÿ

Also See:- Print Alphabets in Python

If you enjoyed this post, share it with your friends. Do you want to share more information about the topic discussed above or do you find anything incorrect? Let us know in the comments. Thank you!