Posted on 26th July 2024|1192 views
how to solve typeerror an integer is required in python?
Posted on 26th July 2024| views
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)))