Update 21.文件读写和异常处理.md--调整循环读取的数组大小
This commit is contained in:
parent
7a798e481d
commit
e59f48c479
|
|
@ -231,7 +231,7 @@ try:
|
|||
data = file1.read(512)
|
||||
while data:
|
||||
file2.write(data)
|
||||
data = file1.read()
|
||||
data = file1.read(512)
|
||||
except FileNotFoundError:
|
||||
print('指定的文件无法打开.')
|
||||
except IOError:
|
||||
|
|
|
|||
Loading…
Reference in New Issue