Python 2D Array access with Points (x,y) -


Good evening companion,

I am new to Python programming, and I was wondering For example, you have a point for example: point = (1,2)

and you can use 2D array in Python using points / coordinates ? Matrix, you can use a certain part of the matrix

matrix [ point ] = here is a sample value

Provides popular multi-dimensional arrays which supports indexing by Tuple: [1, 2] Print [point 1], [3, 4, 5], [6, 7, 8]] print [1, 2] point = (1, 2) print [point]

any external There is no such thing as "two-dimensional array" in Python without libraries is. There are only nested lists to call numpy.array () to call.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -