+ 1
Please is it possible to add int or float to string
int +str
2 Antworten
+ 2
string = text + str(intVariable) + str(floatVariable)
+ 1
Depending on which answer you want int(), float(), and str() will convert a value of the other two to the corresponding type.
i = int("45")+5 #i=50
s = "45"+str(5) #s="455"