I am currently doing the Python 3 course to learn it from complete scratch and I am having trouble with a specific Task. I have written following code and while I am aware its probably not even close to the most effective way I could have written it, I still think it should work.

This is the link to the lesson and below is the code. Everytime I use it it gives out

[2, 4, 8, 3, 9, 27]

instead of

[2, 4, 8, 3, 9, 27, 4, 16, 64]

```
def exponents(bases, powers):
math = []
length = len(bases)
while length > 0:
for i in bases:
math.append(bases[0] ** powers[0])
math.append(bases[0] ** powers[1])
math.append(bases[0] ** powers[2])
bases.pop(0)
return math
length = lenght - 1
```

Help of any kind would be highly appreciated since I donâ€™t understand why it only prints the exponents for the first 2 numbers in bases.