Traceback (most recent call last):
File "challenges/str.py", line 7, in <module>
result = 'a string combined with the number: ' + aString
TypeError: Can't convert 'int' object to str implicitly
由于缺少代码,没有解释,在我看来 aString
对象是一个整数。
为了解决这个问题,带有错误的一行应该变成。
result = 'a string combined with the number: ' + str(aString)
希望这能帮到你!