About 12,600 results
Open links in new tab
  1. python - using index() on multidimensional lists - Stack Overflow

    For two dimensional list; you can iterate over rows and using .index function for looking for item: for row, i in enumerate(l): try: column = i.index(elem) except ValueError: continue. return row, …

  2. Multi-dimensional lists in Python - GeeksforGeeks

    Dec 9, 2018 · In this article, we will cover the Indexing of Multi-dimensional arrays in Python using NumPy. NumPy is a general-purpose array-processing package. It provides a high …

  3. How do you do two dimensional (x,y) indexing in Python?

    Mar 1, 2013 · When you use a pair of indexes in the square brackets, the __getitem__ method is called with a tuple for the key parameter. Here's a simple demo class that simply returns an …

  4. Indexing Lists Of Lists In Python - GeeksforGeeks

    Jan 2, 2025 · Lists of lists, also known as nested lists or sometimes 2D lists, are powerful structures in Python for managing multi-dimensional data such as matrices or tables. Direct …

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

    Jun 20, 2024 · Using 2D arrays/lists the right way involves understanding the structure, accessing elements, and efficiently manipulating data in a two-dimensional grid. When working with …

  6. python - Indexing and slicing a multi-dimensional list - Stack Overflow

    Nov 4, 2021 · Suppose I have a nested list (ndlist) similar to an N-D array of arbitrary dimensions (let ndim be the number of dimensions) and a tuple indexes with len(indexes) == ndim. If ndlist …

  7. Understanding Python Index - Python Central

    Python's index system is one of its fundamental features that allows developers to access, modify, and manipulate elements within sequences like lists, strings, and tuples. While the concept of …

  8. Python Index List: A Comprehensive Guide - CodeRivers

    Jan 29, 2025 · For multi - dimensional lists (lists of lists), we can use multiple indices to access elements at different levels. For example: nested_list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] …

  9. Python Programming Tutorials

    In this Python 3 tutorial, we cover the concept of multi-dimensional lists. Multi dimensional lists are lists within lists, or lists within lists within lists... you get the point. It can get very confusing very …

  10. Multi-Dimensional Lists in Python - Online Tutorials Library

    Jul 10, 2020 · Learn how to work with multi-dimensional lists in Python, including creation, manipulation, and practical examples to enhance your programming skills. Discover the …

  11. Some results have been removed
Refresh