You can also use np.size(a,1), 1 here is the axis and this will give you the number of columns
0
votes
assuming input[row][col]
rows = len(input)
cols = len(list(zip(*input)))
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more