Here's the complete solution:
n = int(input())
counter = 1
for row in range(1, n + 1):
row_nums = []
for col in range(row):
row_nums.append(str(counter))
counter += 1
print(" ".join(row_nums))
We build each row as a list, then join with spaces. This gives cleaner output than end=" " which leaves a trailing space.
Alternative using the formula: the first number in row r is + + + + ... + (r-) = + r(r-)/. But the counter approach is simpler to understand and implement.