ホームページ >バックエンド開発 >Python チュートリアル >在Python中,令values=[0,1,2];values[1]=values,为何结果是[0,[...],2]?
<span class="o">>>></span> <span class="n">values</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> <span class="o">>>></span> <span class="n">values</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">values</span> <span class="o">>>></span> <span class="n">values</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="p">[</span><span class="o">...</span><span class="p">],</span> <span class="mi">2</span><span class="p">]</span>