用法:
tolist()
將緩衝區中的數據作為元素列表返回。
>>> 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]
在 3.3 版中更改:memoryview.tolist現在支持所有單字符本機格式
struct
模塊語法以及多維表示。
相關用法
- Python memoryview.toreadonly用法及代碼示例
- Python memoryview.tobytes用法及代碼示例
- Python memoryview.itemsize用法及代碼示例
- Python memoryview.nbytes用法及代碼示例
- Python memoryview.cast用法及代碼示例
- Python memoryview.obj用法及代碼示例
- Python memoryview.hex用法及代碼示例
- Python memoryview.release用法及代碼示例
- Python memoryview.__eq__用法及代碼示例
- Python memoryview()用法及代碼示例
- Python memoryview用法及代碼示例
- Python statistics median_high()用法及代碼示例
- Python statistics median_low()用法及代碼示例
- Python statistics median()用法及代碼示例
- Python statistics median_grouped()用法及代碼示例
- Python mxnet.symbol.op.broadcast_logical_xor用法及代碼示例
- Python mxnet.test_utils.get_zip_data用法及代碼示例
- Python mxnet.ndarray.op.uniform用法及代碼示例
- Python mxnet.symbol.op.log_softmax用法及代碼示例
- Python mxnet.symbol.space_to_depth用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 memoryview.tolist。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。