human
Sum of digits of a given number to a given power | Function to calculate sum.
Driver Code"
How can the above be solved in Python?

=====
Give me a code to sum of digits of a given number to a given power and the other steps required?
assistant
#Here is code to sum of digits of a given number to a given power and the other steps required.
 def calculate ( n , power ) :
	return sum ( [ int ( i ) for i in str ( pow ( n , power ) ) ] )
n = 5
power = 4
print ( calculate ( n , power ) )