如何在Python中连接两个整数?例如,给定10 and 20,我想要一个返回值1020.
10
20
1020
将两者都转换为字符串,连接字符串,然后将结果转换回整数:
z = int(str(x) + str(y))