改正错误def wordsearch( ): lst = txt.split() find_word = [] for word in lst: if len(word) ==5: find_word += word+" " return wordstr1=input() print(wordsearch(str1))
题主你好,
代码及测试截图如下:
希望可以帮到题主, 欢迎追问