いくつかの単語 (コンマで区切られた) を食べて、これらの単語を含むクリーンなリストを吐き出すプログラムを作成することになっているこの問題が発生しました。問題を解決できません。何か案は?
def wordlist(word):
return word.split(',')
def main ():
sentence = input("write a few words and seperate them with , ")
splitsentence = wordlist(sentence)
for item in splitsentence:
print(item)
main()