append data to a json file on new line python code example Example: python json change line file.write("\n")