I want to write a Python script which downloads every picture of an array which is full of links.
The code looks like this:
for url in array:
if 'jpg' in url or 'jpeg' in url or 'png' in url or 'gif' in url:
print url
As you can see, the if statement is pretty inefficient and I'd like to simplify it. Preferably with a regex if it's possible there. Can someone please help me?