I need help making a triangle that generates using user input by making the user enter the number of rows
<p>It should look like this but reversed and the first column indented</p>

<pre><code>OOOOOOO  
 OOOOOO  
  OOOOO  
   OOOO  
    OOO  
     OO  
      O
</code></pre>

<p>Every time I attempt to do it I always get this code iteration and I don't know where I am going wrong.</p>

<p>Here is what I got so far</p>

<pre><code>row = int(input('Please enter how many rows you want: '))

for r in range(row,0,-1):
    for c in range(r):
        print('o', end='')
    print('')
</code></pre>

<p>Well here goes my version of the solution</p>

<pre><code>line = int(raw_input('Please enter how many lines you want: '))
k=''
for r in range(line):
    k=k+'0'
for r in range(line):
    print k
    k=k[0:len(k)-1]
    k=' '+k
</code></pre>

<p>The terminal output looks like this</p>

<pre><code>Please enter how many lines you want: 7
0000000
 000000
  00000
   0000
    000
     00
      0
</code></pre>

python for-loop nested-loops