I run through my code many times and didn't find anything wrong with it but the result printed out wasn't right:
from cs50 import get_int
while True:
height = get_int("How high is the pyramid?\n")
if height > 0 and height <= 8:
break
for row in range (height):
for space in range (height - row):
print(" ", end="")
for col in range (row):
print("#", end="")
print(" ", end="")
for col in range (row):
print("#", end="")
print()
When I let the height is 4 it printed out like this:
What mistake did I make here?