05:00Python lists remember what you did to them
From the creator
Two equal lists can take differrent amounts of memory! Two Python lists of the same size can take different amounts of memory, even if they contain exactly the same elements. A larger list can even take less memory than a smaller list. How can this be? Lists appear to remember more than just their elements, and somehow contain some information of their history. In this video we investigate this phenomenon. We see what the system getsizeof function returns and how the internal structure of a list is represented in order to find the answer. ― mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosSampleCode libcst: https://libcst.readthedocs.io/en/latest/index.html AST linting vid: https://youtu.be/OjPT15y2EpE Structural pattern matching vid: https://youtu.be/-79HGfWmH_w SUPPORT ME ⭐ --------------------------------------------------- Patreon: https://patreon.com/mCoding Paypal: https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Other donations: https://mcoding.io/donate Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, John Martin, Casey G BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: https://www.facebook.com/james.mcoding CHAPTERS --------------------------------------------------- 0:00 Intro 1:01 Let's investigate 3:04 Under the hood of a list
Published 2022-02-13 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





