Python Array Example - Python

How to write array code in python?

Snippet Code

Rate this page :
  [ 0 votes]

In python, array is generally known as a data structure which stores the values of same data type. Here, the sample code for two dimensional array using python is given below.

demoarray=[[1,2],[3,4]] for i in range(len(demoarray)): for j in range(len(demoarray[i])): print demoarray[i][j]


Ask Questions

Ask Question