ID EN
IO

IOBase

Python 3.11

The abstract base class for all I/O classes.

Syntax

PYTHON
class io.IOBase

Examples

Example 1
PYTHON
with open('spam.txt', 'w') as file:
    file.write('Spam and eggs!')

See Also

IOBase ValueError UnsupportedOperation bytes bytes-like objects str ValueError IOBase