Question: How can i change image url parameters?

Example:

```
http://www.example.com/random1/random2/random3/nameofimage.jpg

```

In random will be random letters and numbers.

I don't have any idea how to do it, if you could help me I thank you

Answer: 
You could change:

```
for a in range(len(arr)):

```

to

```
for a in range(i+1,len(arr)):

```

This will then only test cases when i < a so arr[0]+arr[2] will be found, but it won't try the inverse case.

A faster approach is to add each item into a set and look to see if 8-arr[i] is present in the set. This will be O(n) instead of O(n^2)
How about using 'any'?

```
a = [1,3,7]
if any(v+w == 8 and i != j for i,v in enumerate(a) for j,w in enumerate(a)):
    print "yes"

```