Nested Loop in Python Not Working
<p>I would like to have this output:</p>

<pre><code>* * * 
2 2 2 
4 4 4  
6 6 6 
8 8 8
</code></pre>

<p>I cannot get it and I've tried many ways, but my code doesn't seem to work. Here is my current code:</p>

<pre><code>for row in range(3):
    print ("*", end = " ")
    print ()
    for col in range(2,9,2):
        print (row, end = " ")
        print ()
print()
</code></pre>

<p>What do I do?</p>

<pre><code>print('* * *') 
for col in range(2,9,2):
    print (*[col]*3, sep=' ')
</code></pre>

<p>To be more clear.</p>

<pre><code>&gt;&gt;&gt; a = 2
&gt;&gt;&gt; [a]
[2]
&gt;&gt;&gt; [a]*3
[2, 2, 2]
&gt;&gt;&gt; print(*[a]*3, sep=' ')  # equal to print(a, a, a, sep=' ')
2 2 2
</code></pre>

python