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 "eval". 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> <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> 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>> Alan Gauld wrote:<br>>> "Kent Johnson" <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote<br>>><br>>>>> The notation data[;,0] doesn't make sense and is an error in
<br>>>>> Python.<br>>>> [:,0] is an extended slice, not an error:<br>>>> <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 -
<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>