I have a list of size < N and I want to pad it up to the size N with a value.
Certainly, I can use something like the following, but I feel that there should be something I missed:
>>> N = 5
>>> a = [1]
>>> map(lambda x, y: y if x is None else x, a, ['']*N)
[1, '', '', '', '']
UPD:
Thank you, all.
I decided to with the solution of @gnibbler. To me it looks the most natural in the absence of a built-in.