我想在for循环中使用附加到它的整数创建字符串.像这样:
for i in range(1,11):
string="string"+i
Run Code Online (Sandbox Code Playgroud)
但它返回一个错误:
TypeError: unsupported operand type(s) for +: 'int' and 'str'
Run Code Online (Sandbox Code Playgroud)
连接String和Integer的最佳方法是什么?