human
Capitalize the first and last character of each word in a string | Python3 program to capitalise the first and last character of each word in a string ..
Create an equivalent char array of given string.
k stores index of first character and i is going to store index of last character ..
Check if the character is a small letter If yes , then Capitalise.
Driver code"
Solution in Python:

=====
Can you provide a code to capitalize the first and last character of each word in a string and the other steps required?
assistant
#Here is code to capitalize the first and last character of each word in a string and the other steps required.
 def FirstAndLast ( string ) :
	ch = list ( string ) ;
	i = 0 ;
	while i < len ( ch ) :
		k = i ;
		while ( i < len ( ch ) and ch [ i ] != ' ▁ ' ) :
			i += 1 ;
		if ( ord ( ch [ k ] ) >= 97 and ord ( ch [ k ] ) <= 122 ) :
			ch [ k ] = chr ( ord ( ch [ k ] ) - 32 ) ;
		else :
			ch [ k ] = ch [ k ]
		if ( ord ( ch [ i - 1 ] ) >= 90 and ord ( ch [ i - 1 ] ) <= 122 ) :
			ch [ i - 1 ] = chr ( ord ( ch [ i - 1 ] ) - 32 ) ;
		else :
			ch [ i - 1 ] = ch [ i - 1 ]
		i += 1
	return " " . join ( ch ) ;
if __name__ == " _ _ main _ _ " :
	string = " Geeks ▁ for ▁ Geeks " ;
	print ( string ) ;
	print ( FirstAndLast ( string ) ) ;