Advertisements
Advertisements
प्रश्न
How are lists implemented in memory?
लघु उत्तरीय
Advertisements
उत्तर
- A Python list is implemented as a
variable-length array. - It stores contiguous
references (pointers)to objects, not necessarily the objects themselves. - A list header stores a pointer to this reference array and its length.
- When an item is inserted or appended, Python may resize the array of references.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
