We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try: with open('guido.jpg', 'rb') as file1, open('吉多.jpg', 'wb') as file2: data = file1.read(512) while data: file2.write(data) data = file1.read() except FileNotFoundError: print('指定的文件无法打开.') except IOError: print('读写文件时出现错误.') print('程序执行结束.')
在第一次循环后 read()没参数 是否代表读取剩下所有的内容,这样第一次拆分512字节是不是有没意义了? 初学者,如果说错了请无视
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
在第一次循环后 read()没参数 是否代表读取剩下所有的内容,这样第一次拆分512字节是不是有没意义了?
初学者,如果说错了请无视
The text was updated successfully, but these errors were encountered: