File.read
File.read(*, as_text=False) → bytes | str
Reads the file contents into memory, either as bytes or as a string.
Parameters:
as_text
: bool, default False
Whether to read the file as a string. By default, the raw bytes of the file will be returned.
Returns:
bytes | str
Examples
Last updated