Log:
Python Code:
import memory_graph as mg import js def add_one(a, b, c): a += [1] b += (1,) c += [1] print("display the call stack") js.display(mg.create_graph(mg.get_call_stack())) print("initialize test data") a = [4, 3, 2] b = (4, 3, 2) c = [4, 3, 2] print(f"a:{a} b:{b} c:{c}") print("call function add_one()") add_one(a, b, c.copy()) print(f"a:{a} b:{b} c:{c}")
Run
Graph:
Output: