human
Queries for characters in a repeated string | Print whether index i and j have same element or not ..
Finding relative position of index i , j ..
Checking is element are same at index i , j ..
Driver code"
How can the above be solved in Python?
 Write me a code to queries for characters in a repeated string and the other steps required?
assistant
#Here is code to queries for characters in a repeated string and the other steps required.
 def query ( s , i , j ) :
	n = len ( s )
	i %= n
	j %= n
	print ( " Yes " ) if s [ i ] == s [ j ] else print ( " No " )
if __name__ == " _ _ main _ _ " :
	X = " geeksforgeeks "
	query ( X , 0 , 8 )
	query ( X , 8 , 13 )
	query ( X , 6 , 15 )