【发布时间】:2021-11-29 23:29:26
【问题描述】:
phrase = "This is amazing"
print("How many characters in the variable phrase " + len(phrase) + "this are the numbers")
它说只能将str(不是“int”)连接到str
【问题讨论】:
-
试试
str(len(phrase));长度通常是数字 -
这能回答你的问题吗? How can I concatenate str and int objects?
标签: python string integer concatenation