human
Delete consecutive same words in a sequence | Function to find the size of manipulated sequence.
Start traversing the sequence.
Push the current string if the stack is empty.
compare the current string with stack top if equal , pop the top.
Otherwise push the current string.
Return stack size.
Driver code"
Solution in Python:

=====
Write me a code to delete consecutive same words in a sequence and the other steps required?
assistant
#Here is code to delete consecutive same words in a sequence and the other steps required.
 def removeConsecutiveSame ( v ) :
	st = [ ]
	for i in range ( len ( v ) ) :
		if ( len ( st ) == 0 ) :
			st . append ( v [ i ] )
		else :
			Str = st [ - 1 ]
			if ( Str == v [ i ] ) :
				st . pop ( )
			else :
				st . append ( v [ i ] )
	return len ( st )
if __name__ == ' _ _ main _ _ ' :
	V = [ " ab " , " aa " , " aa " , " bcd " , " ab " ]
	print ( removeConsecutiveSame ( V ) )