How to convert list [a, b, c] to python slice index[:a, :b :c]?
<p>For example, I'm having a group of multi-dimension arrays. I want to write a method to specify the size of the slice for this array such as:</p>

<pre><code>slice = data[:a, :b, :c]
</code></pre>

<p>Because I could only get a list of [a, b, c]. I want to know how can I convert this list to slice index. Or is there a way to connect the list with slice index so as to operate this array as:</p>

<pre><code>list = [a, b, c]
slice = data[list]
</code></pre>

<p>Any reply would be appreciated.</p>