Skip to content

Commit c09317d

Browse files
committed
读取磁盘文件的内容
1 parent bc117e8 commit c09317d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

exercise/a.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
中国
2+
美丽
Loading

exercise/io_test.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 读取磁盘文件的内容
2+
file = open('a.txt', 'r', encoding='UTF-8')
3+
print(file.readlines())
4+
file.close()

0 commit comments

Comments
 (0)