Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

3d array

[[[1, 2], [4, 5]], [[6, 7], [7, 8]]]
Comment

3d array

#!/usr/bin/env python3

list = []

for i in xrange(3):
    list.append([])
    for j in xrange(3):
        list[i].append(i+j)

print(list)
print(list[0][0])
print(list[1][2])
Comment

PREVIOUS NEXT
Code Example
Python :: how to close opened file in python 
Python :: python program to calculate the average of numbers in a given list 
Python :: run python module from command line 
Python :: python regex (d)(?=d1) 
Python :: continue statement in python 
Python :: python named tuples 
Python :: double underscore methods python 
Python :: ValueError: invalid literal for int() with base 10: ' pandas 
Python :: python escape forward slash 
Python :: pandas use dict to transform entries 
Python :: python append value to column 
Python :: removing stop words from the text 
Python :: determinant of 3x3 numpy 
Python :: web scraping with selenium 
Python :: plt.hist bins 
Python :: list all files in a folder 
Python :: roc curve 
Python :: keras transfer learning 
Python :: insert in python 
Python :: how to access pandas column 
Python :: Run Django application using Gunicorn 
Python :: if list element contains string python 
Python :: python keyword arguments 
Python :: how to get list size python 
Python :: create new spreadsheet 
Python :: Code example of Python Modulo Operator 
Python :: python linkedin api 
Python :: swap list 
Python :: how to activate venv python 
Python :: search method in python 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =