human
Minimum cost to convert string into palindrome | Function to return cost.
length of string.
Iterate from both sides of string . If not equal , a cost will be there.
Driver code"
How can the above be solved in Python?

=====
Can you provide a code to minimum cost to convert string into palindrome and the other steps required?
assistant
#Here is code to minimum cost to convert string into palindrome and the other steps required.
 def cost ( st ) :
	l = len ( st )
	res = 0
	j = l - 1
	i = 0
	while ( i < j ) :
		if ( st [ i ] != st [ j ] ) :
			res += ( min ( ord ( st [ i ] ) , ord ( st [ j ] ) ) - ord ( ' a ' ) + 1 )
		i = i + 1
		j = j - 1
	return res
st = " abcdef " ;
print ( cost ( st ) )