How do I convert an integer to a string in Python?
We can do this using Python’s built-in str()
function.
my_integer = 100 my_string = str(my_integer) # my_string will equal "100"
This function works by calling the __str__()
method on the provided object.