human
Maximum length prefix of one string that occurs as subsequence in another | Return the maximum length prefix which is subsequence ..
Iterating string T ..
If end of string S ..
If character match , increment counter ..
Driver Code"
How can the above be solved in Python?
 Can you provide a code to maximum length prefix of one string that occurs as subsequence in another and the other steps required?
assistant
#Here is code to maximum length prefix of one string that occurs as subsequence in another and the other steps required.
 def maxPrefix ( s , t ) :
	count = 0
	for i in range ( 0 , len ( t ) ) :
		if ( count == len ( s ) ) :
			break
		if ( t [ i ] == s [ count ] ) :
			count = count + 1
	return count
S = " digger "
T = " biggerdiagram "
print ( maxPrefix ( S , T ) )