Fill: 打开 File for 读取
填空题 简单
题目
Fill in 空白到 打开 file in 读取模式.
代码
f = open("data.txt", "___")
提示
单个-letter 模式 for 读取是...
解释
模式 'r' 打开 file for 读取 (默认模式). file 必须 exist, 否则 FileNotFoundError 是 raised. Use 'w' for 编写, '' for appending, 'rb' for binary 读取.
相关资源
相关课程
- File Handling
File 模式.
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。