3 ms·
It also works for just reading other people's code and I had it translate this line of code: clips = [ CompositeVideoClip( moveLetters(letters,funcpos),
by sharemywin 3y ago
It also works for just reading other people's code and I had it translate this line of code:
clips = [ CompositeVideoClip( moveLetters(letters,funcpos),
size = screensize).subclip(0,5)
for funcpos in [vortex, cascade, arrive, vortexout] ]
to this so I could see what it's doing:
# Define a list of functions that will be applied to the letters
transitions = [vortex, cascade, arrive, vortexout]
# Create a CompositeVideoClip for each transition function and append to clips list
clips = []
for transition in transitions:
letters_moved = moveLetters(letters, transition)
clip = CompositeVideoClip(letters_moved, size=screensize).subclip(0, 5)
clips.append(clip)
It also talked about a list comprehension which I hadn't heard of before.(not a regular python coder)