Is there a way to create global variables using a For loop and then be able to reuse this variable inside and outside that loop?
I'm looking to achieve something like this:
for x in for_loop:
global variable_1
variable_1 = some_value
variable_2 = some_other_value
print(f"{variable_1} added to: {variable_2}")
print(f"{variable_1} added to: {variable_2}")
I've been browsing for hours to find a way to do this and I can't figure it out.
First, is it possible? Second, is it a good idea/way to go about this?
Each variable would have code like this:
clip1_audio = VideoFileClip("1.mp4").audio
clip1_audio = clip1_audio.audio_fadein(1).audio_fadeout(1)
clip1 = VideoFileClip("1.mp4").set_audio(clip1_audio)
clip1 = clip1.set_start(5).crossfadein(1)