title: What's the best way of nesting a loop with the same number of iterations?
body: <pre><code>for i in range(N):
     for j in range(N):
        print(i,j)
  </code></pre>
  <p>This is the code I wrote and it does what I want it to. However, it seems repetitive to write N twice and explicitly write the loop twice as there are 3 lines and they are not information dense at all. I feel like I should not be explicitly writing the number of iterations twice when they are the same, they are both equal to N. Is there a better way to do this in Python?</p>