the following two loop-constructs are basically the same. I just can't figure out how to insert two variables start = start+2
and end = end+2
inside the first syntax. Thank you
FIRST CONSTRUCT (list comprehension):
start = 1
end = 3
clips = [ImageClip(os.path.join(folder,pic))
.resize(width=w*9.3/16)
.set_start(start)
.set_end(end)
.set_pos(lambda t:(max((402), (int(w-3*w*t))), "center"))
for pic in picfiles]
SECOND CONSTRUCT (regular loop):
start = 1
end = 3
clips = []
for pic in picfiles:
clips.append(ImageClip(os.path.join(folder,pic))
.resize(width=w*9.3/16)
.margin(left=31, opacity=0)
.set_start(start)
.set_end(end)
.set_pos(lambda t:(max((402), (int(w-3*w*t))), "center")) # move from right to center
)
start = start + 2
end = end + 2