SyntaxFix
Write A Post
Hire A Developer
Questions
If you use numpy, you can easily create 2d arrays:
import numpy as np row = 3 col = 5 num = 10 x = np.full((row, col), num)
x
array([[10, 10, 10, 10, 10], [10, 10, 10, 10, 10], [10, 10, 10, 10, 10]])