Skip to content

Commit 41b7860

Browse files
committed
@update: day 10
1 parent 1fd9b5e commit 41b7860

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

files/files.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
file_obj = open("files.txt", "wt")
24
print("This is a temp file", file=file_obj)
35
file_obj.write("Second line")
@@ -22,4 +24,8 @@
2224
print("Lines: ", lines)
2325
file_obj.close()
2426
for line in lines:
25-
print("Line...", line)
27+
print("Line...", line)
28+
29+
print(os.path.isfile('files.txt'))
30+
print(os.path.isfile('files.temp'))
31+
print(os.path.exists('files.txt'))

0 commit comments

Comments
 (0)