Two-Dimensional Array Defination in Python

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
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • 教書多年了,上課一直堅持用普通話,但在生活中則難舍鄉音。一家人操著地道的魯北口音,親情濃濃的,特別熨帖。 并不是所...
    格爾黑閱讀 230評論 2 7
  • 記得對聯一副,上聯“柴米油鹽醬醋茶”,下聯“琴棋書畫詩酒花”。 這幅對聯特別讓我印象深刻,它把藝術生活化了,其實藝...
    勾勾5閱讀 1,194評論 0 2
  • 1.看完50本書,寫20萬字。 Ps :2016年寫了73000字。看了20本書。 2.去學習瑜伽課程一次,冥想課...
    曾曾的麻麻閱讀 263評論 0 0