79562698

Date: 2025-04-08 17:28:39
Score: 1
Natty:
Report link

Graphing your data using package memory_graph can help your understanding of the Python Data Model:

import memory_graph as mg # see link above for install instructions

a = [10, 20, 30, 40, 50, 60, 70, 80, 90]
b = a
a[0] = a
a.append(a)

mg.show(locals()) # graph the local variables

memory_graph

Just like variable a and b can reference a list value, a list can reference a list value, including itself.

Full disclosure: I am the developer of memory_graph.

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: bterwijn