[Solved] How do you make this shape in Python with nested loops?


for row in range(6):                 # this outer loop computes each of the 6 lines
   line_to_print="#"
   for num_spaces in range(row):     # this inner loop adds the desired number or spaces to the line
       line_to_print  = line_to_print + ' '
   line_to_print = line_to_print + '#'
   print line_to_print 

prints this output:

##
# #
#  #
#   #
#    #
#     #

0

solved How do you make this shape in Python with nested loops?