Chapter folders renamed

This commit is contained in:
Karan Solanki
2021-08-13 11:44:51 +05:30
parent d9f3f5b159
commit 1eb709f83a
211 changed files with 0 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#contextmgr1.py
with open("myfile.txt",'w') as f1:
f1.write("This is a sample file\n")
lines = ["This is a test data\n", "in two lines\n"]
f1.writelines(lines)
with open("myfile.txt",'r') as f2:
for line in f2.readlines():
print(line)