import json def open_file(filepath): with open(filepath, 'r', encoding='utf-8') as infile: return infile.read() def save_file(filepath, content): with open(filepath, 'w', encoding='utf-8') as outfile: outfile.write(content) def append_file(filepath, content): with open(filepath, 'w', encoding='utf-8') as outfile: outfile.write(content)