forked from chankjen/FileStruct
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileStruct.py
More file actions
27 lines (19 loc) · 707 Bytes
/
FileStruct.py
File metadata and controls
27 lines (19 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#print("File Structure")
# x = 120
# y = 200
# z = 300
# def add(x, y, z):
# return x + y + z
# print(add(x, y, z))
# with open("readme.md", "r", encoding="utf-8", errors="ignore") as file:
# print(file.read())
# file = open('readme.md', 'w', encoding='utf-8')
# file.write('Welcome to PLP Academy.\n')
# print('File created successfully.')
# file.close()
# Append "welcome to PLP" to readme.md
with open("readme.md", "a", encoding="utf-8", errors="ignore") as file:
file.write("\nwelcome to PLP")
# print("File structure module loaded successfully.")# Now read and print the updated file
with open("readme.md", "r", encoding="utf-8", errors="ignore") as file:
print(file.read())