这是我的代码 -
sentence = input("Enter a sentence without punctuation")
sentence = sentence.lower()
words = sentence.split()
pos = [words.index(s)+1 for s in words]
hi = print("This sentence can be recreated from positions", pos)
print(hi)
saveFile = open("exampleFile.txt" , "w")
saveFile.write(hi)
saveFile.close()
但是我得到错误 - TypeError:write()参数必须是str,而不是None 我不知道如何解决它