擅长:python、mysql、java
<p>这取决于Python的版本。对于3.2,<a href="http://docs.python.org/py3k/reference/datamodel.html#emulating-container-types" rel="nofollow">^{<cd1>}</a>起作用:</p>
<blockquote>
<p>Note Slicing is done exclusively with the following three methods. A call like
a[1:2] = b
is translated to
a[slice(1, 2, None)] = b
and so forth. Missing slice items are always filled in with None.</p>
</blockquote>