# Use the function str() to turn an integer into a string integer = 123 string = str(integer) string # Output: # '123'
Here is what the above code is Doing:
1. We create a variable called integer and set it equal to 123.
2. We create a variable called string and set it equal to the string version of integer.
3. We print the value of string.