human
Largest substring with same Characters | Function to find largest sub with same characters.
Traverse the string.
If character is same as previous increment temp value.
Return the required answer.
Driver code.
Function call"
How can the above be solved in Python?
assistant
#Here is code to largest substring with same Characters and the other steps required.
 def Substring ( s ) :
	ans , temp = 1 , 1
	for i in range ( 1 , len ( s ) ) :
		if ( s [ i ] == s [ i - 1 ] ) :
			temp += 1
		else :
			ans = max ( ans , temp )
			temp = 1
	ans = max ( ans , temp )
	return ans
s = " abcdddddeff "
print ( Substring ( s ) )