擅长:python、mysql、java
<p>以下内容:</p>
<pre><code>list_reversed = list
</code></pre>
<p>使两个变量引用同一个列表。当你改变一个,它们都会改变。在</p>
<p>要复制,请使用</p>
^{pr2}$
<p>更好的是,使用内置函数而不是编写自己的函数:</p>
<pre><code>list_reversed = reversed(list)
</code></pre>
<p>另外,我建议不要使用<code>list</code>作为变量名,因为它隐藏了<a href="http://docs.python.org/2/library/functions.html#list" rel="noreferrer">the builtin</a>。在</p>