in ,

🧑🏻‍💻 TechAcademy | Active engineers explain how to handle 2D arrays in Python [for beginners]

An active engineer explains how to handle 2D arrays in Python [for beginners]

I will explain how to handle 2D arrays in Python.

If you're not familiar with Python in the first place, read an article that explains what Python is and get a better understanding.

 

This article is based on the contents of the TechAcademy online boot camp Python course.

 

 

What is a two-dimensional array

A one-dimensional array is an array with one dimension, and multiple elements are arranged on a straight line.
(Example) [1,2,3,4,5,6]

A two-dimensional array is an array with two dimensions and is also called a matrix.
(Example) [[1,2,3], [4,5,6]]

The following is a visually easy-to-understand description.
 

[[1,2,3], [4,5,6]]

 
Similarly, you can define an array with 3 or 4 dimensions.
 

How to make a two-dimensional array

To create a 2D array in Python, write as follows.
 

xs = ...

→See more in Tech Tech Magazine