Two-Dimensional Array Defination

2017-06-06  本文已影响0人  cutelittlePanda

In Python, a multi-dimensional table like this can be implemented as a sequence of sequences. A table is a sequence of rows. Each row is a sequence of individual cells. This allows us to use mathematical-like notation. Where the mathematician might sayAi,j, in Python we can sayA[i][j]. In Python, we want the rowifrom table A, and columnjfrom that row.

This looks remarkably like thelistoftuples we discussed inthe section called “Lists of Tuples”

2-Dimensional Metrix sample code:

Matrix

Useful link:

http://www.linuxtopia.org/online_books/programming_books/python_programming/python_ch20s05.html

3-Dimensional Array Defination:

3-D array defination
上一篇 下一篇

猜你喜欢

热点阅读