Copy a set
suggest changeSets also have a copy
method. You can use this method to perform a shallow copy.
>>> s1 = {()}
>>> s2 = s1.copy()
>>> s1 is s2
False
>>> s2.add(3)
>>> s1
{[]}
>>> s2
{3,[]}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents