English

How is memory allocated to a list in Python?

Advertisements
Advertisements

Question

How is memory allocated to a list in Python?

Short Answer
Advertisements

Solution

  • Python allocates memory dynamically for a list.
  • The list stores a contiguous array of references to its objects.
  • Its size is not fixed; memory is resized when elements are added or removed.
  • The memory used by each reference depends on the system architecture, such as 32-bit or 64-bit mode.
shaalaa.com
  Is there an error in this question or solution?
Chapter 5: Liner List Manipulation - EXERCISE [Page 104]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 5 Liner List Manipulation
EXERCISE | Q 6. | Page 104
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×