how to access elements in a 2D array?

后端 未结 6 1860
南旧
南旧 2020-11-29 08:49

I am new to python and I would like to understand how one goes about manipulating the elements of an array. If I have for example:

a= ( a11 a12 a13 )  and b          


        
6条回答
  •  清酒与你
    2020-11-29 09:09

    If you have this :

    a = [[1, 1], [2, 1],[3, 1]]
    

    You can easily access this by using :

    print(a[0][2])
    a[0][1] = 7
    print(a)
    

提交回复
热议问题