yield json.dumps(eval(l)) new lines EOL code example Example: python json change line file.write("\n")