[Python] Convert an int to a str

Created on November 30, 2026

Use str to convert an integer to a string. This example uses type to display the result's type.

num = 1
print(type(str(num)))

Output

<class 'str'>
Python