Just by using more space (e.g. characters + newlines) your code will be much more pleasant / readable.
# dense
def generate_xmas_tree(rows=10):
width, output = rows*2, []
for i in range(1, width+1, 2):
row = "*"*i
output.append(row.center(width, " "))
return "\n".join(output)
# sparse
def generate_xmas_tree(rows=10):
width = rows * 2
output = []
for i in range(1, width + 1, 2):
row = "*" * i
output.append(row.center(width, " "))
return "\n".join(output)
#zen