0
How do I concatenate two integers without changing the type
3 Antworten
+ 3
Convert the integers on the fly.
a = 42
b = 1337
print(str(a) + str(b))
a and b are still integers here.
+ 2
import math
a=int(input("a: "))
b=int(input("b: "))
print("ab = {0}".format(a*(10**(int(math.log10(b))+1)) + b))
0
a=2
print(a, +3)
23