This function prints all anagram pairs in a given array of strings
def findAllAnagrams ( arr : list , n : int ) : NEW_LINE INDENT for i in range ( n ) : NEW_LINE INDENT for j in range ( i + 1 , n ) : NEW_LINE INDENT if areAnagram ( arr [ i ] , arr [ j ] ) : NEW_LINE INDENT print ( arr [ i ] , " is ▁ anagram ▁ of " , arr [ j ] ) NEW_LINE DEDENT DEDENT DEDENT DEDENT