Diamond with asterisks using python while loops
<p>My goal is to print a diamond of python. Here is my attempted code:</p>

<pre><code>height=int(input("Please enter height : "))
row=1
#top half of diamond
while(row&lt;height+1):
     spaces=0
     while (spaces&lt;(height-row)):
           spaces+=1
           print ("",end='')

     j=2*row-1
     while (j&gt;0):
          j=j-1
          print("*",end='')
     row+=1
     print()

row=height-1
#bottom half of diamond
while (row&gt;0):
     spaces=0
     while(spaces&lt;height-row):
          spaces+=1
          print("",end='')
     j=2*row-1
     while(j&gt;0):
          print("*",end='')
          j=j-1
    row=row-1
    print()
</code></pre>

<p>This code seems to print only the right side of the diamond as follows:</p>

<pre><code>Please enter height : 5
 *
 ***
 *****
 *******
 *********
 *******
 *****
 ***
 *
</code></pre>

<p>How can I fix the code so that it prints the left side of the diamond?</p>