I have a problem

I have a list like this:

['*', '**', '***']

but I need it like this:

[' * ', '** ', '***']

All strings have to be the same like with the stars centered. Everything else is spaces

Are they always going to be three characters long?

>>> [[' * ', '** ', '***'][len(x) - 1] for x in ['*', '**', '***']]
[' * ', '** ', '***']
>>> 

It’s actually supposed to be a function. Each string should be as long as the number you put in. the last string should be all stars. Also each element should only have an odd number of stars

That’s not how you described it, initially. Where are you getting this criteria from?