Python字符串和整数连接我想在for循环中使用附加到它的整数创建字符串。像这样:for i in range(1,11):
string="string"+i但它返回一个错误:TypeError: unsupported operand type(s) for +: 'int' and 'str'连接String和Integer的最佳方法是什么?
添加回答
举报
0/150
提交
取消