擅长:python、mysql、java
<p>您可能已经阅读了文档列表:
<a href="http://docs.python.org/tutorial/datastructures.html" rel="nofollow">http://docs.python.org/tutorial/datastructures.html</a></p>
<p>不过,我也没看到你要找的语法。</p>
<p>我认为您需要的是两部分索引语法,它取代了常用的容器方法“slice”</p>
<p>python处理子列表的方式是</p>
<pre><code>myListInstance[start:end] //<-- note the colon
</code></pre>
<p>更多信息:</p>
<p><a href="http://docs.python.org/tutorial/datastructures.html#the-del-statement" rel="nofollow">http://docs.python.org/tutorial/datastructures.html#the-del-statement</a></p>