Main Tutorials

Python – How to convert int to String

In Python, we can use str() to convert a int to String.


num1 = 100

print(type(num1))  # <class 'int'>

num2 = str(num1)

print(type(num2))  # <class 'str'>

Output


<class 'int'>
<class 'str'>

References

  1. Python docs – str()
  2. Python – How to convert String to int

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments