human
Check duplicates in a stream of strings | Function to insert the names and check whether they appear for the first time.
To store the names of the employees.
If current name is appearing for the first time.
Driver code"
How can the above be solved in Python?

Write me a code to check duplicates in a stream of strings and the other steps required?
assistant
#Here is code to check duplicates in a stream of strings and the other steps required.
 def insertNames ( arr , n ) :
	string = set ( ) ;
	for i in range ( n ) :
		if arr [ i ] not in string :
			print ( " No " ) ;
			string . add ( arr [ i ] ) ;
		else :
			print ( " Yes " ) ;
if __name__ == " _ _ main _ _ " :
	arr = [ " geeks " , " for " , " geeks " ] ;
	n = len ( arr ) ;
	insertNames ( arr , n ) ;