About 840,000 results
Open links in new tab
  1. Find length of 2D array Python - Stack Overflow

    May 23, 2012 · Find length of 2D array Python Asked 13 years, 7 months ago Modified 8 months ago Viewed 480k times

  2. How to get the length of a 2D Array in Python - bobbyhadz

    Apr 8, 2024 · On each iteration, we use the len() function to get the length of the current subarray and pass the result to the sum() function. You can also use a simple for loop to calculate the number of …

  3. How to Find the Length of a 2D Array (List of Lists) in Python

    In Python, a 2D array is typically represented as a list of lists (e.g., [[1, 2], [3, 4]]). When finding its "length," there are two common interpretations: the ...

  4. How To Check The Length Of An Array In Python?

    Jan 1, 2025 · Learn how to check the length of an array (or list) in Python using the `len ()` function. This tutorial includes examples for 1D, 2D, and NumPy arrays for clarity

  5. Python | Using 2D arrays/lists the right way - GeeksforGeeks

    Jul 11, 2025 · In this article, we will explore the right way to use 2D arrays/lists in Python. Using 2D arrays/lists the right way Using 2D arrays/lists the right way involves understanding the structure, …

  6. How to Get the Size of a 2D Array in Python - CodeRivers

    Apr 23, 2025 · In Python, working with multi-dimensional arrays, especially 2D arrays, is a common task in various fields such as data analysis, machine learning, and image processing. Knowing how to …

  7. NumPy: Get the dimensions, shape, and size of an array

    Modified: 2025-04-23 | Tags: Python, NumPy You can get the number of dimensions, the shape (length of each dimension), and the size (total number of elements) of a NumPy array (numpy.ndarray) using …

  8. How to find the length of 2D array in Python | sebhastian

    Feb 17, 2023 · How to find the length of 2D array in Python by Nathan Sebhastian Posted on Feb 17, 2023 Reading time: 3 minutes To find the length of a 2D array, you need to find the total number of …