Answers for "python initialize two dimensional list"

3

python initialize multidimensional list

[[0 for i in range(10)] for j in range(10)]
Posted by: Guest on November-19-2019
0

initialise a 2d array python

x = [[foo for i in range(10)] for j in range(10)]
# x is now a 10x10 array of 'foo' (which can depend on i and j if you want)
Posted by: Guest on April-16-2020

Code answers related to "python initialize two dimensional list"

Python Answers by Framework

Browse Popular Code Answers by Language