Is there any pythonic way to write the following code:
extensions = ['.mp3','.avi']
file_name = 'test.mp3'
for extension in extensions:
I have an ambiguous memory that the express declaration of the for loop can be kept away from and be written in the if condition. Is this valid?