human
String containing first letter of every word in a given string with spaces | Function to find string which has first character of each word ..
Traverse the string ..
If it is space , set v as true ..
Else check if v is true or not . If true , copy character in output string and set v as false ..
Driver Code"
How can the above be solved in Python?
 ... Can you provide a code to string containing first letter of every word in a given string with spaces and the other steps required?
assistant
#Here is code to string containing first letter of every word in a given string with spaces and the other steps required.
 def firstLetterWord ( str ) :
	result = " "
	v = True
	for i in range ( len ( str ) ) :
		if ( str [ i ] == ' ▁ ' ) :
			v = True
		elif ( str [ i ] != ' ▁ ' and v == True ) :
			result += ( str [ i ] )
			v = False
	return result
if __name__ == " _ _ main _ _ " :
	str = " geeks ▁ for ▁ geeks "
	print ( firstLetterWord ( str ) )