title: Empty pyramid in python 3
body: <p>I want to print an empty pyramid in python 3 and my teacher suggested me this code but i am confused about the list(array) and i want an alternative of this code. Is there any alternative method to print an empty pyramid. This code is also available on available on stackoverflow but i want to solve it by using simple if else.</p>
  
  <pre><code>#Function Definition
  def Empty_triangle(n): # Here value of n is 5
      for i in list(range(n-1))+[0]:
  
          line = ""
          leadingSpaces = n-2-i       
  
          line += " "*leadingSpaces  
          line += "*"
          if i != 0:
              middleSpaces = 2*i-1
              line += " "*middleSpaces
              line += "*"
          print(line)
  
  
  # Function Call
  n = 5             
  Empty_triangle(n)
  </code></pre>
  
  <hr>
  
  <p>Example of code which i want
  if (row==0 and row==5 and col!=0):</p>
  
  <p>output should like this using ifelse </p>
  
  <p><a href="https://i.stack.imgur.com/bbd5p.png" rel="nofollow noreferrer">Can it be done with simple if else</a></p>