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 sh
If you want to pad with None instead of '', map() does the job:
>>> map(None,[1,2,3],xrange(7)) [(1, 0), (2, 1), (3, 2), (None, 3), (None, 4), (None, 5), (None, 6)] >>> zip(*map(None,[1,2,3],xrange(7)))[0] (1, 2, 3, None, None, None, None)