Can you tell me more about "id of" function

Help me to understand plz

It reports its input.
Or a deep copy of the input, if the input is a list.

An independant copy of the list?

Yes.
A shallow copy is where all the items at the first level only are copied. Take, for instance, this:
image
Since MAP creates a new list, it's effectively a shallow copy. "Shallow" meaning the items that are lists are still the exact same. But ID makes a "Deep" copy, which means the items that are lists are deep copied as well, until every single atomic item is copied into a new list.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.