def turn_to_power(list, power=1):
return [number**power for number in list]
Example:
list = [1,2,3]
turn_to_power(list)
=> [1, 2, 3]
turn_to_power(list,2)
=> [1, 4, 9]
UPD: you should also consider reading about pow(x,y) function of math lib: https://docs.python.org/3.4/library/math.html