save to file wins, loose, draw and dif
This commit is contained in:
1 parent
e7cd6312e0
commit
50930062f4
4 files changed
+26
-39
No files matched your search
@@ -1,18 +0,0 @@
|
||||
def save_to_file(name, data):
|
||||
# начало
|
||||
with open(name, "w", encoding="utf-8") as file:
|
||||
file.write(data)
|
||||
|
||||
|
||||
# конец
|
||||
|
||||
def load_from_file(name):
|
||||
data = ""
|
||||
with open(name, "r", encoding="utf-8") as file:
|
||||
data = file.read()
|
||||
return data
|
||||
|
||||
|
||||
def create_file(name):
|
||||
with open(name, "x", encoding="utf-8") as file:
|
||||
file.write("")
|
||||
Reference in new issue
Block a user