Skip to content

Python code snippet – How to make an int into a string ?

# Use the function str() to turn an integer into a string
integer = 123
string = str(integer)
string
# Output:
# '123'
See also  Python code snippet - How to convert data type of a column in pandas?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.