On Sat, Dec 1, 2012 at 9:35 PM, Dave Angel <d...@davea.name> wrote:
>
> [M[i][~i] for i,dummy in enumerate(M) ]

Since enumerate() iterates the rows, you could skip the first index:

    >>> [row[~i] for i,row in enumerate(M)]
    [3, 5, 7]
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to