An array is a linear data structure. It consists of linear ordered elements of the same data type, with the length of the data fixed after it is defined, thus allocated into continuous memory for storage. All elements can be accessed or assigned by index, starting from 0 and incrementing by 1 gradually.
In many programming languages, an array is a built-in data structure.
array = ['a', 'b', 'c']array[0] # aarray[1] = 'd' # assign "d" to the second elementpython
It's the easiest way to maintain the order relationship between data.
string
string = ['H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd']python
matrix
matrix = [[1, 2],[3, 4],]python