An exercise to help build the right mental model for Python data.

The “Solution” link visualizes execution and reveals what’s actually happening using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵: https://github.com/bterwijn/memory_graph

  • aev_software@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    5 days ago

    Tell me again how python is easy to learn for beginner programmers.

    Other languages that have similar behavior include Java and JavaScript, and yes you have to be careful with list / array operations in those languages as well, lest you operate on the wrong list inadvertently. Happened to me. It will happen to you.

    • vonbaronhans@midwest.social
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      You don’t have to compile. You don’t need semicolons.

      Python was my first programming language, and those two things alone honestly are really nice. Doesn’t mean there aren’t a million other issues and difficulties, though, lol.