StringIO and cStringIO – Work with text buffers using file ...
pymotw.com › 2 › StringIOJul 11, 2020 · StringIO provides a convenient means of working with text in memory using the file API (read, write. etc.). There are two separate implementations. The cStringIO version is written in C for speed, while StringIO is written in Python for portability. Using cStringIO to build large strings can offer performance savings over some other string ...