human
What is a code to check whether two strings contain same characters in same order and the other steps required given the following:
Check whether two strings contain same characters in same order | Python3 implementation of approach.
if length of the b = 0 then we return true.
if length of a = 0 that means b is not present in a so we return false.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to check whether two strings contain same characters in same order and the other steps required.
 def checkSequence ( a , b ) :
	if len ( b ) == 0 :
		return True
	if len ( a ) == 0 :
		return False
	if ( a [ 0 ] == b [ 0 ] ) :
		return checkSequence ( a [ 1 : ] , b [ 1 : ] )
	else :
		return checkSequence ( a [ 1 : ] , b )
if __name__ == ' _ _ main _ _ ' :
	s1 = " Geeks "
	s2 = " Geks "
	if ( checkSequence ( s1 , s2 ) ) :
		print ( " Yes " )
	else :
		print ( " No " )