How can I simplify the following:
imgs = []
for i, obj in enumerate(objlist):
imgs.append( foo(obj, f"img-{i}.png") )
where objlist
an array of objects
and foo
is a method that processes the object and saves an image receiving both the object and the new file name, it returns the same name given.