Source Code:
(back to article)
# create a 2D array with 3 rows and 4 columns, filled with zeroes rows = 3 cols = 4 arr = [[0 for j in range(cols)] for i in range(rows)] print(arr)
Result:
Report an issue