Jun-27-2018, 09:03 PM
let me add python quotes for easy understanding.
for s in Words: with open("%s.txt" % s, "w") as f: for sentence in sentences: if( s in sentence): f.write(sentence + '\n')