小册名称:Python合辑4-130个字符串操作示例
如何连接 str 和 int 对象
i = 123a = "foobar"s = a + str(i)print(s)
i = 123
a = "foobar"
s = a + str(i)
print(s)
Output:
foobar123