number_triangle(n) that returns a list of n strings forming a growing number triangle, where row i (1-indexed) contains the digits 1 through i separated by single spaces. For example for n=3: ["1", "1 2", "1 2 3"].number_triangle(3)
["1", "1 2", "1 2 3"]
Row i lists numbers 1..i.
number_triangle(1)
["1"]
A single row with just "1".
Use an outer loop for the row number and an inner loop (or a range->join) to build each row string.
`" ".join(str(x) for x in range(1, i + 1))` builds one row cleanly.