def write_md(f_dir, content): with open(f_dir, 'w') as md: md.write(content) def read_line_md(f_dir): with open(f_dir, 'r') as md: pre_content = md.readlines() return pre_content