Answers for "how to edit 2d array from list in python"

3

python initialize a 2d array

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 November-09-2020
0

python how to change a point in a multidimensional list

multidimensional_list = [[1, 2, 3], [3, 5, 4]]
multidimensional_list[0][1] = 3     # First list, second value (prev 2)
Posted by: Guest on November-05-2020

Code answers related to "how to edit 2d array from list in python"

Python Answers by Framework

Browse Popular Code Answers by Language