+ 2

How to convert int to strings in Python?

26th Jul 2018, 2:58 AM
TerrIA
TerrIA - avatar
4 odpowiedzi
+ 1
Use str([value]). Example: num = 1 print(typeof(str(num))) Will output 'str' as object type
26th Jul 2018, 3:25 AM
apex137
apex137 - avatar
+ 2
stringName = str(input("Input text: "))
26th Jul 2018, 1:29 PM
Adelola
Adelola - avatar
+ 2
Adelola input is string by default whatever you would input...
26th Jul 2018, 1:38 PM
Markus Kaleton
Markus Kaleton - avatar
+ 1
num = 1 num = str(num) print(type(num))
26th Jul 2018, 7:08 AM
Markus Kaleton
Markus Kaleton - avatar