I'm new to Python and I'm learning coding/encoding, unicode, ascii and so on. I would like to print ASCII characters according to their codes and using chr() function.
def table_ascii():
"procédure imprimant une table des caractères ascii avec leur valeurs"
i = 127
while i < 258:
print(f"{i} -> {chr(i)}")
i += 1
table_ascii()
Unfortunately, the result is wrong. It stops at the code 157 :
127 ->
128 ->
129 ->
130 ->
131 ->
132 ->
133 ->
134 ->
135 ->
136 ->
137 ->
138 ->
139 ->
140 ->
142 ->
143 ->
144 ->
146 ->
147 ->
148 ->
149 ->
150 ->
151 ->
152 ->
154 ->
155 ->
157 ->
I understand these codes return blank but why do they stop the process?
Setup:
- Python 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] on linux
- Using VIM - Vi IMproved 8.1
When I run this code in Visual Studio Code, the script produces output through 256. But in my console (Linux Mate), it blocks. That's difficult to understand for me...