memoryview() Function in Python
Syntax: memoryview(obj)
Parameters:
- obj – object whose internal data is to be exposed.
- supporting buffer protocol – str and bytearray (but not unicode).
Return Value: Returns a memoryview object.
memoryview() in Python
Python memoryview() function returns the memory views objects. Before learning more about memoryview() function let’s see why do we use this function.