原书出处
Python Cookbook(第3版)中文版
: data = f.read(16)
text = data.decode('utf-8') with open('somefile.bin', 'wb') as f: text = 'Hello World' f.write(text.encode('utf-8')) 关于二进制I/O,一个鲜为人知的行为
是,像数组和C结构体这样的对象可以直接用
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Python Cookbook(第3版)中文版/_epub-src/OEBPS/Text/part0011.xhtml
EPUB SHA-256:06e9310484dbd481a38263fd0ee26359bea9a3862a64cb4a53d4096b0f991e70