Dan*_*899 -1 python syntax-error
我的代码遇到问题,当我运行这个时,我得到一个语法错误'print'
word1 = input("Words: ")
characters = len(word1)
listOfStuff = str(word1)
strip = ""
x = 1
while not characters > 140 - 11:
word = input("Words: ")
if characters <= 140 - 11:
listOfStuff = listOfStuff + ' ' + str(word)
characters = characters + len(word) - 1
elif characters > 140 - 11:
strip = len(word)
break
finalLength = len(listOfStuff)
print(listOfStuff.rstrip(strip)
print(finalLength)
Run Code Online (Sandbox Code Playgroud)
我什么时候做错了?
| 归档时间: |
|
| 查看次数: |
94 次 |
| 最近记录: |