def write_a_story(filename, ent1, ent2, ent1_text, ent2_text): with open(filename, "w") as f: f.write(f"According to our birds, there might be something going on between {ent1} and {ent2}. \nSince they have recently been seen in touch quite a lot.") f.write(f"\nLet us give you some background about {ent1} and {ent2}:") f.write("\n ") f.write(f"\nLadies first! Let's start with {ent1}:") for sent1 in ent1_text: f.write(f"\n{sent1}") f.write("\n ") f.write(f"\n{ent2}:") for sent2 in ent2_text: f.write(f"\n{sent2}") f.write("\n ") f.write(f"\nSo, what do you think? Are the rumours true about {ent1} and {ent2}?")