We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

How do I perform matrix operations using Python?

The Python FAQ has an entry on how to create multidimensional lists:

how-do-i-create-a-multidimensional-list

You may also want to look into the ‘numpy’ module which contains many resources for scientific computing, including powerful matrix operations: http://numeric.scipy.org/

CATEGORY: tutor