I am learning python, and I recently came across a module Numpy. With the help of Numpy, one can convert list to arrays and perform operations much faster. Let's say we create an array with following values :
import numpy as np np_array=array([1,2,3,4,5])
So we need one square bracket if we need to store one list in the form of array. Now if I want to create a 2D array, why it should be defined like this:
And not like this:
I apologize if this question is a duplicate, but I couldn't find any answer.