Generate two loops with different ranges
<p>I am trying to generate two loops and I want the second loop to count from the first number of my first loop in range of 10 until 80. It looks like this:</p>

<pre><code>0
0
1
12345678910
2
234567891011121314151617181920
3
3456789101112131415161718192021222324252627282930
</code></pre>

<p>Continue like this until 8 in my first loop and 80 in my second.
My code so far</p>

<pre><code>count = 1
for i in range(9):
    for j in range(0, i,10):
        print(count, end=80)
        count = count i+1

         print()
</code></pre>

<p>Any suggestion on what I am doing wrong will be very helpful.</p>

<p>You don't need a <code>for</code> loop to print a list of integers: use the <code>str.join</code> method. Here is a example:</p>

<pre><code>for x in range(9):
    print('{}\n{}'.format(str(x), ''.join(map(str, range(x, 10 * x + 1)))))
</code></pre>

<p>The trick is to map the integers into strings before performing the join operation: <code>map(str, range(x, 10 * x + 1))</code>.</p>

python loops nested