human
Write me a code to print all distinct strings from a given array and the other steps required given the following:
Print all distinct strings from a given array | Function to find the distinct strings from the given array.
Stores distinct strings from the given array.
Traverse the array.
If current string not present into the set.
Insert current string into the set.
Traverse the set DistString.
Print distinct string.
Driver Code.
Stores length of the array"
Solution in Python:
assistant
#Here is code to print all distinct strings from a given array and the other steps required.
 def findDisStr ( arr , N ) :
	DistString = set ( )
	for i in range ( N ) :
		if ( arr [ i ] not in DistString ) :
			DistString . add ( arr [ i ] )
	for string in DistString :
		print ( string , end = " ▁ " )
if __name__ == " _ _ main _ _ " :
	arr = [ " Geeks " , " For " , " Geeks " , " Code " , " Coder " ]
	N = len ( arr )
	findDisStr ( arr , N )