About 133,000 results
Open links in new tab
  1. How to initialize a two-dimensional array (list of lists, if not using ...

    I'm beginning python and I'm trying to use a two-dimensional list, that I initially fill up with the same variable in every place. I came up with this: def initialize_twodlist(foo): twod_list ...

  2. python - How to define a two-dimensional array? - Stack Overflow

    Jul 12, 2011 · Coming from other languages: it IS a difference between an 1D-Array containing 1D-Arrays and a 2D-Array. And AFAIK there is no way of having a multi-dimensional-array (or list) in …

  3. Iterating over a 2 dimensional python list - Stack Overflow

    May 14, 2013 · Iterating over a 2 dimensional python list [duplicate] Asked 12 years, 6 months ago Modified 8 years, 5 months ago Viewed 519k times

  4. Rotating a two-dimensional array in Python - Stack Overflow

    In a program I'm writing the need to rotate a two-dimensional array came up. Searching for the optimal solution I found this impressive one-liner that does the job: rotated = zip(*original[::-1]) ...

  5. python - How to determined if a 2 dimensional list contain a value ...

    How to determined if a 2 dimensional list contain a value? Asked 13 years, 1 month ago Modified 13 years, 1 month ago Viewed 43k times

  6. How do you extract a column from a multi-dimensional array?

    263 Could it be that you're using a NumPy array? Python has the array module, but that does not support multi-dimensional arrays. Normal Python lists are single-dimensional too. However, if you …

  7. python - 2d array of zeros - Stack Overflow

    There is no array type in python, but to emulate it we can use lists. I want to have 2d array-like structure filled in with zeros. My question is: what is the difference, if any, in this two expres...

  8. How to sum a 2d array in Python? - Stack Overflow

    May 23, 2012 · I want to sum a 2 dimensional array in python: Here is what I have:

  9. python - How do I sum the columns in 2D list? - Stack Overflow

    Aug 9, 2013 · How do I sum the columns in 2D list? Asked 15 years, 4 months ago Modified 6 years, 5 months ago Viewed 38k times

  10. python - How to access the elements of a 2D array? - Stack Overflow

    this is a 2D array. The first indice access the rows in the matrix. The second indice access the column. so a [0] [1] means first row and second column. the matrix is a 2x2 grid.