Thank all for the discussion.<br>Maybe I can separate my question into two.<br><br>First, I have experience in Matlab, where I can use &quot;eval&quot;. I wonder whether someone knows about it.<br><br>Second, if I just want to return data[:,1], ...data[:,-1] separately without knowing ahead how many columns data has. What should I do?
<br><br><br><br><div><span class="gmail_quote">On 10/7/07, <b class="gmail_sendername">Kent Johnson</b> &lt;<a href="mailto:kent37@tds.net">kent37@tds.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Kent Johnson wrote:<br>&gt; Alan Gauld wrote:<br>&gt;&gt; &quot;Kent Johnson&quot; &lt;<a href="mailto:kent37@tds.net">kent37@tds.net</a>&gt; wrote<br>&gt;&gt;<br>&gt;&gt;&gt;&gt; The notation data[;,0] doesn&#39;t make sense and is an error in
<br>&gt;&gt;&gt;&gt; Python.<br>&gt;&gt;&gt; [:,0] is an extended slice, not an error:<br>&gt;&gt;&gt; <a href="http://docs.python.org/ref/slicings.html">http://docs.python.org/ref/slicings.html</a><br><br>We discussed this quite a bit last July:
<br><a href="http://mail.python.org/pipermail/tutor/2007-July/055814.html">http://mail.python.org/pipermail/tutor/2007-July/055814.html</a><br><br>Kent<br>_______________________________________________<br>Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br></blockquote></div><br>