A hard 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

  • esa@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    28 days ago

    I was trying not to spoil that a |= b and a = a | b have different semantics though, as that pretty much winds up giving away the answer IMO