C.<p><span class="h-card" translate="no"><a href="https://oceanplayground.social/@matt" class="u-url mention">@<span>matt</span></a></span> </p><p>Oh, and sets too.</p><p>Example with shallow list copy and an embedded mutable object (another list):</p><p>>>> a = [1, 2, [3, 4]]<br />>>> b = a.copy()</p><p>>>> b<br />[1, 2, [3, 4]]<br />>>> b[0] = 5<br />>>> b<br />[5, 2, [3, 4]]</p><p>>>> a<br />[1, 2, [3, 4]]</p><p>>>> b[2][0] = 8<br />>>> a<br />[1, 2, [8, 4]]<br />>>> b<br />[5, 2, [8, 4]]</p><p><a href="https://mindly.social/tags/mutability" class="mention hashtag" rel="tag">#<span>mutability</span></a> <a href="https://mindly.social/tags/copy" class="mention hashtag" rel="tag">#<span>copy</span></a> <a href="https://mindly.social/tags/WhoTouchedMy" class="mention hashtag" rel="tag">#<span>WhoTouchedMy</span></a></p>