关于作者

Discuss / Python / StringIO和BytesIO 阅读总结

StringIO和BytesIO 阅读总结

问题来源

KeMoing

#1 Created at ...

StringIO:在内存中读取字符串str 要把str写入StringIO,我们需要先创建一个StringIO,然后,像文件一样写入即可;要读取StringIO,可以用一个str初始化StringIO,然后,像读文件一样读取 BytesIO与StringIO一致


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.