Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
Can anyone tell me how to convert int to string in Python?

1 Answer

0 votes
by (108k points)

For converting an integer variable into a string variable, you have to first declare the integer, and with the help of the below code, you will be able to convert the integer into a string:

age = 30#integer variable

print("Hello, I am " + str(age) + " years old.")

# Output

# Hello, I am 30 years old.

If you are looking for an online course to learn Python, I recommend this Python Course by Intellipaat.

Related questions

0 votes
1 answer
asked Jul 10, 2020 in Python by ashely (50.2k points)
0 votes
1 answer

Browse Categories

...