PyDocs

Nav

Python Runtime Services

memoryview.tolist

  • memoryview.tolist()
Return the data in the buffer as a list of elements.
Changed in 3.3
  • 3.3: tolist() now supports all single character native formats in struct module syntax as well as multi-dimensional representations.
1 Example
>>> memoryview(b'abc').tolist()
[97, 98, 99]
>>> import array
>>> a = array.array('d', [1.1, 2.2, 3.3])
>>> m = memoryview(a)
>>> m.tolist()
[1.1, 2.2, 3.3]
from the Python docs
See Also
No see-alsos for builtins/memoryview.tolist
0 Notes
No notes for memoryview.tolist