human
Find the direction from given string | Function to find the final direction.
if count is positive that implies resultant is clockwise direction.
if count is negative that implies resultant is anti - clockwise direction.
Driver code"
Solution in Python:

=====
Give me a code to find the direction from given string and the other steps required?
assistant
#Here is code to find the direction from given string and the other steps required.
 def findDirection ( s ) :
	count = 0
	d = " "
	for i in range ( len ( s ) ) :
		if ( s [ i ] == ' L ' ) :
			count -= 1
		else :
			if ( s [ i ] == ' R ' ) :
				count += 1
	if ( count > 0 ) :
		if ( count % 4 == 0 ) :
			d = " N "
		elif ( count % 4 == 10 ) :
			d = " E "
		elif ( count % 4 == 2 ) :
			d = " S "
		elif ( count % 4 == 3 ) :
			d = " W "
	if ( count < 0 ) :
		count *= - 1
		if ( count % 4 == 0 ) :
			d = " N "
		elif ( count % 4 == 1 ) :
			d = " W "
		elif ( count % 4 == 2 ) :
			d = " S "
		elif ( count % 4 == 3 ) :
			d = " E "
	return d
if __name__ == ' _ _ main _ _ ' :
	s = " LLRLRRL "
	print ( findDirection ( s ) )
	s = " LL "
	print ( findDirection ( s ) )