memoryview()
function is used to find the a memory view object of the given argument in Python for the given input.
memoryview()
function is a part of Python Built-in Functions.
Syntax of memoryview()
Function
The syntax of
memoryview()
function in Python is:
memoryview(obj)
Parameters of memoryview()
Function in Python
x
– Where x
is any valid . This parameter is required.
Compatibility
memoryview()
function is available and compatible with both Python 2.x
and 3.x
.
Return Value of memoryview()
Function in Python
memoryview()
function returns a memory view object of the given argument for the given input.
Python memoryview()
Function Example 1
Example CODE
Output:
Python memoryview()
Function Example 2
Example CODE
Output: