Print all distinct characters of a string in order ( 3 Methods ) |  ; checking if two charactors are equal
string = " GeeksforGeeks " NEW_LINE for i in range ( 0 , len ( string ) ) : NEW_LINE INDENT flag = 0 NEW_LINE for j in range ( 0 , len ( string ) ) : NEW_LINE INDENT if ( string [ i ] == string [ j ] and i != j ) : NEW_LINE INDENT flag = 1 NEW_LINE break NEW_LINE DEDENT DEDENT if ( flag == 0 ) : NEW_LINE INDENT print ( string [ i ] , end = " " ) NEW_LINE DEDENT DEDENT