C.<p><span class="h-card" translate="no"><a href="https://fosstodon.org/@foo" class="u-url mention">@<span>foo</span></a></span> </p><p>It's a little <a href="https://mindly.social/tags/clearer" class="mention hashtag" rel="tag">#<span>clearer</span></a> what's going on here if you put it this way:</p><p>>>> b = []<br />>>> b.append(b)<br />>>> b<br />[[...]]<br />>>> b is b[0]<br />True</p><p>So all you've done is create a <a href="https://mindly.social/tags/list" class="mention hashtag" rel="tag">#<span>list</span></a>, and then <a href="https://mindly.social/tags/append" class="mention hashtag" rel="tag">#<span>append</span></a> (not extend) that list to itself. Since `a` and `a[0]` are the same <a href="https://mindly.social/tags/object" class="mention hashtag" rel="tag">#<span>object</span></a>, the `in` test will return True either way.</p>