Python: List Comprehension: Power N

Write the function power_n that takes three integers a, b, and n, and return a list containing all the numbers between a and b (inclusive) raised to power n.


power_n(2, 7, 3) -> [8, 27, 64, 125, 216, 343]

Test 1    

Test 2    

Test 3    

Test 4