[Tutor] matrix q? print the first column of matrix
Seabrook, Richard
rhseabrook@aacc.edu
Sun Jun 8 08:53:02 2003
-----Original Message-----
From: evros loizides [mailto:loizie@hotmail.com]
Sent: Sat 6/7/2003 1:09 PM
To: tutor@python.org
Cc:=09
Subject: [Tutor] matrix q? print the first column of matrix
i am try to print the columns of a square matrix but i getting only the
first number
for example myMatrix =3D [[2,3,4],[4,5,6],[7,8,9]]
i want to print the first column only .
how can i do that?
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
How about this --
=20
for L in myMatrix:
print L[0]
Dick S.
=20