Answers for "python display 2d list"

0

code to find the shape of the 2d list in python

from numpy import array
l = [[2, 3], [4, 2], [3, 2]]
a = array(l)
print a.shape
Posted by: Guest on August-18-2020
0

2d list in python

def list_2D(r, c):
    l = []
    for i in range(r):
        x = [0] * c
        l.append(x)
    return l
Posted by: Guest on November-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language