Nah_kagz1092 commited on
Commit
396472d
·
verified ·
1 Parent(s): 301ca84

Create data.py

Browse files
Files changed (1) hide show
  1. data.py +10 -0
data.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ def load_data(file_path):
4
+ with open(file_path, 'r', encoding='utf-8') as file:
5
+ data = json.load(file)
6
+ return data
7
+
8
+ def save_data(data, file_path):
9
+ with open(file_path, 'w', encoding='utf-8') as file:
10
+ json.dump(data, file, ensure_ascii=False, indent=4)