human
Check if two same sub | Function to check if similar subsequences occur in a string or not.
iterate and count the frequency.
counting frequency of the letters.
check if frequency is more than once of any character.
Driver Code"
How can the above be solved in Python?

Give me a code to check if two same sub and the other steps required?
assistant
#Here is code to check if two same sub and the other steps required.
 def check ( s , l ) :
	freq = [ 0 for i in range ( 26 ) ]
	for i in range ( l ) :
		freq [ ord ( s [ i ] ) - ord ( ' a ' ) ] += 1
	for i in range ( 26 ) :
		if ( freq [ i ] >= 2 ) :
			return True
	return False
if __name__ == ' _ _ main _ _ ' :
	s = " geeksforgeeks "
	l = len ( s )
	if ( check ( s , l ) ) :
		print ( " YES " )
	else :
		print ( " NO " )