I'm struggling to save my multiple text files reviews to code it in python this is my code for it:
print("Similarity Value: " + str(similarity))
print("Most Similar Watch: ")
print(mostSimilar)
with open("{}.txt".format(casebase[mostSimilar][0])) as review1:
print(review1.read())
with open(filepath, "a") as myfile:
myfile.write('\n')
myfile.write(str(unknowncase))
if __name__ == '__main__':
main()
what this shows now when I run it says:
[Errno 22] invalid mode ('r') or filename: ' "L watch".txt'
but the files does exist in the specified folder too im not sure what the problem is.