How about islice-ing the concatenation of the original list with a padding generator?
from itertools import islice, repeat
def fit_to_size(l, n):
return list(islice(
( x
for itr in (l, repeat(0))
for x in itr ),
n))
You might prefer this slightly more explicit implementation:
def fit_to_size(l, n):
def gen():
yield from l
while True: yield 0
return list(islice(gen(), n))