title: How to make a triangle using a for loop in Python
body: <p>I'm new to programming and have been experimenting with for loops to try and figure out how to make different shapes however I have encountered a problem that I cannot solve.</p>
  
  <p>So far I have been able to create a rectangle of 1's as shown below in a 5X5</p>
  
  <pre><code>for i in range(0, 5):
    X = 0
    for j in range(0, 5):    
    X = (X*10)+1
    print(X)
  </code></pre>
  
  <p>I would like to be able to modify this code using a for loop to be able to create a triangle like so...</p>
  
  <pre><code>1 1 1
  1 1
  1
  </code></pre>
  
  <p>How would I go about doing this? Is there also a way that I could input n and dependant on whatever number is input the program creates a triangle of that size? for example I input a 5 and it creates a triangle like...</p>
  
  <pre><code>11111
  1111
  111
  11
  1
  </code></pre>
  
  <p>Ive tried various different things but i'm unable to figure it out.</p>