Posted on 25th April 2024
This error occurs when you want to print the ASCII value of the integer but forgot to typecast the integer type, for example, consider the following program
q=list(str(45678))
for j in q:
print(chr(j))
Here we have to cast the char() function the solution is the following code.
q=list(str(45678))
for j in q:
print(chr(int(j)))
STILL GOT QUERIES?