geekdoc-python-zh/docs/pythonlibrary/python-101-working-with-fil...

22 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Python 101 -使用文件(视频)
> 原文:<https://www.blog.pythonlibrary.org/2021/09/03/python-101-working-with-files-video/>
应用程序开发人员总是与文件打交道。每当您编写新的脚本或应用程序时,都会创建它们。你用微软 Word 写报告,保存电子邮件或下载书籍或音乐。文件到处都是。您的网络浏览器会下载大量小文件,让您的浏览体验更快。
当你写程序的时候你必须与预先存在的文件交互或者自己写出文件。Python 提供了一个名为`open()`的内置函数,可以帮助您完成这些任务。
在本视频中,您将学习如何:
* 打开文件
* 读取文件
* 写文件
* 附加到文件
我们开始吧!
[https://www.youtube.com/embed/Tg0rZkuuB0I?feature=oembed](https://www.youtube.com/embed/Tg0rZkuuB0I?feature=oembed)
如果你更喜欢阅读教程而不是观看,那么你可能想看看下面的文章:
* Python 101 - [处理文件](https://www.blog.pythonlibrary.org/2020/06/24/python-101-working-with-files/)