This commit is contained in:
adii1823
2021-10-28 17:39:37 +05:30
parent 32c12d89f4
commit 48cef734e0
34 changed files with 796 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
# files/write_not_exists.py
with open('write_x.txt', 'x') as fw: # this succeeds
fw.write('Writing line 1')
with open('write_x.txt', 'x') as fw: # this fails
fw.write('Writing line 2')