Python笔记3

1.str()
转换为字符串
2.open()
打开文静啊
3..read()
读取文件
4..closed or .close()
关闭文件
5..write()
写入文件
6.with open()
安全关闭
7.readline()
读取单行
8.’\n’
空行
9..readlines()
列表返回所有行
10.tell()
返回文件当前位置
11..seek(offset, whence)
返回文件对象位置
12..dumps() or .dump()
序列化
13..load()
反序列化

Tags:

Add a Comment