this didn't help. i don't understand why it prints "*"s in multiple rows and not within the same row.

and the rest of it, makes no sense to me no matter how much i've tried to think about it. about all i understand is the "+ 1", which let's you use the last number in the range, because, if not specified, Python will not use the last number in the range.

i guess i just don't get for loops, and when you have nested for loops, i really have issues.

and when you do print(), it prints "nothing" (or empty string, if this is easier to understand) and ends it with a new line (which makes the text go the the next line).

Does it help to understand the code? If not, here is the explanation within the code:

# User gives the integer, being a number of the rows
base_length = int(input("enter the base of the triangle: "))
# This is a loop on the integers, from zero (0) to the (base_length - 1)
# Which means the number of iterations equals exactly base_length value:
for row in range(base_length):
print() # Prints just a new line
# First uses "row" as a base, it will be the number of the asterisks
# Then it iterates on the list of integers (column equals zero, then 1 etc.)
for column in range (row + 1):
# Prints asterisk and ends the output with space instead of new line:
print("*", end=" ")

getting my head 'round loops isn't easy. and as i mentioned, when you nest loops, i really get confused. thanks for your explanation though. i used it along with a lot of writing - expanded each iteration - to get a better, albeit, not complete, understanding of what's happening.
–
Sameer SheikhNov 1 '12 at 14:43

@SameerSheikh: Do you have some specific questions? If yes, I would be happy to answer them. You can also try to draw an algorithm (with all the loops, conditions etc.), if you unerstand things better by visualizing them. There is also a way to see the execution step by step, as it happens: just use pdb module by inserting "import pdb; pdb.set_trace()" where you want to start the debugging (see the details in the module documentation).
–
TadeckNov 1 '12 at 19:49