0

How do I change an integer to a string?

I couldn't do it, and I don't remember how. I don't remember even if it is possible.

29th Jan 2020, 3:04 AM
Agustin Benini
4 Antworten
+ 2
In python. y=4 x=str(y) #now x is string data type. the str function is used to convert any data type to string.
29th Jan 2020, 3:08 AM
Maninder $ingh
Maninder $ingh - avatar
+ 5
a = int(39) print("I am "+ str(a) +" years old")
29th Jan 2020, 3:10 AM
BroFar
BroFar - avatar
+ 1
Thank you
29th Jan 2020, 3:09 AM
Agustin Benini
+ 1
// Please add a relevant tag about programming language where you need help
29th Jan 2020, 3:10 AM
Sudarshan Rai
Sudarshan Rai - avatar