HF RL Explorer

Task: Deep Copy of a Dictionary in Python

Task: Deep Copy of a Dictionary in Python: a task in Terminal-Lego-15k (Harbor dataset). In Python, dictionaries have a .copy() method, but it only creates a shallow copy. This means that nested objects (like lists) inside the dictionary are still referenced, not duplicated. When you modify a…

The task

In Python, dictionaries have a `.copy()` method, but it only creates a shallow copy. This means that nested objects (like lists) inside the dictionary are still referenced, not duplicated. When you modify a nested object in the original dictionary, the change is reflected in the "copy" as well.

Part of PrimeIntellect/Terminal-Lego-15k.