human
Add two numbers represented by two arrays | Return sum of two number represented by the arrays . Size of a [ ] is greater than b [ ] . It is made sure be the wrapper function.
array to store sum ..
Until we reach beginning of array . we are comparing only for second array because we have already compare the size of array in wrapper function ..
find sum of corresponding element of both array ..
Finding carry for next sum ..
If second array size is less the first array size ..
Add carry to first array elements ..
If there is carry on adding 0 index elements . append 1 to total sum ..
Converting array into number ..
Wrapper Function.
Making first array which have greater number of element.
Driven Code"
How can the above be solved in Python?

Can you provide a code to add two numbers represented by two arrays and the other steps required?
assistant
#Here is code to add two numbers represented by two arrays and the other steps required.
 def calSumUtil ( a , b , n , m ) :
	sum = [ 0 ] * n
	i = n - 1
	j = m - 1
	k = n - 1
	carry = 0
	s = 0
	while j >= 0 :
		s = a [ i ] + b [ j ] + carry
		sum [ k ] = ( s % 10 )
		carry = s // 10
		k -= 1
		i -= 1
		j -= 1
	while i >= 0 :
		s = a [ i ] + carry
		sum [ k ] = ( s % 10 )
		carry = s // 10
		i -= 1
		k -= 1
	ans = 0
	if carry :
		ans = 10
	for i in range ( n ) :
		ans += sum [ i ]
		ans *= 10
	return ans // 10
def calSum ( a , b , n , m ) :
	if n >= m :
		return calSumUtil ( a , b , n , m )
	else :
		return calSumUtil ( b , a , m , n )
a = [ 9 , 3 , 9 ]
b = [ 6 , 1 ]
n = len ( a )
m = len ( b )
print ( calSum ( a , b , n , m ) )