We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94ca07c commit 43763fbCopy full SHA for 43763fb
C05/co5_p1.py
@@ -2,12 +2,20 @@
2
3
fn = open("demo.txt",'r') #run in thonny (filename,mode)
4
s= fn.readline() # for read line by line
5
-print(s)
+print(s)
6
+fn.close()
7
print(fn.closed) #file close status
8
print(fn.mode) #file mode
9
print(fn.name) #file name
10
11
+
12
fo =open("demo2.txt","w")
13
14
fo.write("Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms")
-fo.close()
15
+fo.close()
16
17
+f2 =open("demo2.txt","w")
18
+f2.write("Python gdgg")
19
+f2.close()
20
21
C05/demo2.txt
@@ -1 +1 @@
1
-Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms
+Python gdgg
0 commit comments