def longestWord(letters):
    combinations = list(map(''.join, permutations(letters)))
print(combinations)
longestWord('aah')
Converting the output of itertools.permutations from list of tuples to list of strings