Scroll Down to See All▾
absaiterallanextanyasciibinboolbreakpointbytearraybytescallablechrclassmethodcompilecomplexdelattrdictdivmodenumerateevalexecfilterfloatformatfrozensetgetattrglobalshasattrhashhelphexidinputintisinstanceissubclassiterlenlistlocalsmapmaxminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszip__import__clear_(dict)clear_(list)clear_(set)copy_(dict)copy_(list)copy_(set)fromkeysgetitemskeyspop_(dict)pop_(list)pop_(set)popitemsetdefaultupdatevaluescount_(tuple)count_(list)count_(str)index_(tuple)index_(list)index_(str)adddifferencedifference_updatediscardintersectionintersection_updateisdisjointissubsetissupersetremove_(set)remove_(list)symmetric_differencesymmetric_difference_updateunionupdateclosefilenoflushisattyreadreadablereadlinereadlinesseekseekabletelltruncatewritablewritewritelinesappendextendinsertreversesortcapitalizecasefoldcenterencodeendswithexpandtabsfindformatisalnumisalphaisasciiisdecimalisdigitisidentifierislowerisnumericisprintableisspaceistitleisupperjoinljustlowerlstripmaketranspartitionreplacerfindrindexrjustrpartitionrsplitrstripsplitsplitlinesstartswithstripswapcasetitletranslateupperdirzfillFunction Details: memoryview
Description
Creates a memory view object from a bytes-like object.
Extended Description
The memoryview() function creates a memory view object from a bytes-like object. It allows you to access the internal data of an object that supports the buffer protocol without copying the object's contents. This can be useful for efficient manipulation of large data structures.
Read More about memoryview from Python Documentation
Function Signature
memoryview(obj: Union[bytes, bytearray, array.array]) -> memoryview
Module: builtins
Class: memoryview
Parameters
Parameter List
- obj: Union[bytes, bytearray, array.array]
Return
Returns a memoryview object that allows direct access to an object's memory.
Return Type
memoryview
Output
Explanation
This example shows basic operations with a memoryview created from a bytes object.