How do I minimize the space between characters in my nested loop?

A

aislinx

Guest
Picture

Hello, so I'm trying to get my nested loop to display an image like the picture shown above. So far, this is the code that I have.

for a in range (1):
print("#""#")
for b in range (0,5,1):
print("#", end=" ")
for c in range(b):
print(" ", end=" ")
print("#")


I'm new to the site, so please excuse my terrible formatting. The output I'm getting seems to have an extra space per line compared to the image given, and I'm not sure how to get rid of the space. I'd appreciate any help!

Thanks!

Continue reading...
 
Top