``x = array([1, 2, 3], [5, 6, 7])`` is a valid statement?
Answers
Answer:
`x = array([1, 2, 3], [5, 6, 7])``
Explanation:
Itvis not a valid statement. You can create multi dimensional array but without quotes
Answer:
But it is not a valid statement. This is a 2×3 multidimensional array.
Explanation:
An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array (generally denoted by the name of the array).
For simplicity, we can think of an aof array of a fleet of stairs where on each step is placed a value (let’s say one of your friends). Here, you can identify the location of any of your friends by simply knowing the count of the step they are array can be handled in Python by a module named array. They can be useful when we have to manipulate ly specific data type values. A user can treat lists as arrays. However, users caconstrainraint the type of elements stored in a list. If you create arrays using the array module, all elements of the array must be of the same type.
#SPJ2