我在 Python 2.7 中遇到了这个烦人的问题,它不会让我这样做
numbers = raw_input(numbers + 1 + ': ')
我希望它在控制台中打印出“数字 + 1”作为数字,但是..它出现了以下错误消息:
Traceback (most recent call last):
File "F:/Python/Conversation", line 25, in <module>
numbers = raw_input(numbers + 1 + ': ')
TypeError: unsupported operand type(s) for +: 'int' and 'str'
有没有解决方案或只是我可以使用的另一件事来代替这个?提前致谢!