title: How do 2d array list comprehensions work?
body: <p>I'm practicing list comprehension techniques and I'm a bit confused about this one.</p>
  <p><code>arr1 = np.array([[j for i in range(10)] for j in range(10)])</code></p>
  <p>So I understand that you want a number <code>j</code> for every <code>i</code> in <code>range(10)</code>, which sort of doesn't make sense cause you didn't initialize j, so it should be <code>i for i in range(10)</code>. Then we somehow initialize 10 columns, but how does the left <code>j</code> relate to the <code>j in range(10)</code>?</p>
  <p>Pretty confused about this, I would really appreciate it if someone could translate this to what is actually going on.</p>
  <p>Also, in Java you initialize 2d arrays like so: <code>int[][] arr1 = new int[5][2]; // 5 rows, 2 columns</code>, could you achieve this in python without list comprehension?</p>