Need a python code

can i get python code for this?
stacking
Input: 3
Output:
i
i i
i i i

Not really, no. This feels very much like homework, whose purpose is to
aid your learning by having you actually solve the problem.

Why not suggest how you think this could be done (even as a human,
trying to draw the output by hand: how would you decide what to draw
where?) The very act of trying to describe that process leads to the
things which would be in a programme to do that same thing.

If you’re very new to Python we can suggest ways parts of that process
might be done if you truly have no idea where to start. Then write a
programme, and try to make it run correctly. If you reach an issue you
can’t solve, come back to this discussion with your code, the bad
output, and a description of what you hoped would happen.

Cheers,
Cameron Simpson cs@cskk.id.au

I encourage you to try it yourself. Whenever there’s something I don’t know I hop onto Google for research. I’ll give you a hint – use a for loop and the range() function.