我有我的代碼的麻煩,當我運行此我得到一個語法錯誤「打印」Synax錯誤打印[巨蟒]
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)
當我做錯了什麼?
使用vim和類型':DoMatchParen' –