Question: ```py
a = [1,4,7,5,9,3,5]
b = [3,7,6,5,4,9,7]
c = []

for i in range(len(a)-1):
    if a[i] < b[i]:
        c.append(b[i])        

```

I have the simple code above.

Since `len(a) = 7`. The for loop should run 7-1 =6 times. I want to check is `a[i]` is less than `b[i]`. If this is true, then it should print the `b[i]` value in the new list `c`. However, when I run this code there is nothing in the output. I knew something was wrong with this code before running it but I can't figure out what.

Could someone out what is wrong?
Thanks

I tried to amend the for loop.

Answer: 
I am not entirely sure what you are trying to achieve but as far as I can tell your code is doing what you are saying. The reason you are not getting any output is because you are not printing the resulting list (try add `print(c)` to the end of your code.

If instead you are trying to make a new list that contains the larger value of either list you can achieve this with the following code,

```
a = [1,4,7,5,9,3,5]
b = [3,7,6,5,4,9,7]
c = []

for i in range(len(a)):
    if a[i] < b[i]:
        c.append(b[i])
    else:
        c.append(a[i])

print(c)

```

This code will loop over the whole list and then check to see which element from the two lists is larger and append that one to the new list c.

Hopefully this answered your question
I'm not sure about what is your meaning about "there is nothing in the output".

If this code snippet is in a function, you can try to add

```
return c

```

or you just print out the variable c, like

```
print(c)

```

Then you'll find the result of your code.