ch08
This commit is contained in:
@@ -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')
|
||||
Reference in New Issue
Block a user