+ 4
How do we concat an int to a string here?
3 odpowiedzi
+ 7
To string:
number=50
you can use str(number)
To int:
word="50"
You can use int(word)
+ 3
You can convert the integer into a string (with the str() function) and then concat the 2 strings.
For example:
string = "Python"
integer = 3
print(string + str(integer)) # "Python3"
+ 2
You can type cast.....
For example....
Str("2")+str("2")
O/p.....22