human
Length Of Last Word in a String | Python3 program for implementation of simple approach to find length of last word.
String a is ' final ' -- can not be modified So , create a copy and trim the spaces from both sides.
Driver code"
Solution in Python:

What is a code to length Of Last Word in a String and the other steps required?
assistant
#Here is code to length Of Last Word in a String and the other steps required.
 def lengthOfLastWord ( a ) :
	l = 0
	x = a . strip ( )
	for i in range ( len ( x ) ) :
		if x [ i ] == " ▁ " :
			l = 0
		else :
			l += 1
	return l
if __name__ == " _ _ main _ _ " :
	inp = " Geeks ▁ For ▁ Geeks ▁ "
	print ( " The ▁ length ▁ of ▁ last ▁ word ▁ is " , lengthOfLastWord ( inp ) )