Spaces:
Sleeping
Sleeping
File size: 438 Bytes
c20a1af |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# Copyright (C) 2020 * Ltd. All rights reserved.
# author : Sanghyeon Jo <[email protected]>
def read_txt(path):
with open(path, 'r') as f:
return [line.strip() for line in f.readlines()]
def write_txt(path, data_list):
with open(path, 'w') as f:
for data in data_list:
f.write(data + '\n')
def add_txt(path, string):
with open(path, 'a+') as f:
f.write(string + '\n') |