human
Length Of Last Word in a String | Python3 program for implementation of efficient approach to find length of last word.
Split by space and converting String to list and.
Driver code"
How can the above be solved in Python?
 ... Can you provide 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 length ( str ) :
	lis = list ( str . split ( " ▁ " ) )
	return len ( lis [ - 1 ] )
str = " Geeks ▁ for ▁ Geeks "
print ( " The ▁ length ▁ of ▁ last ▁ word ▁ is " , length ( str ) )