def wordFreqs(text, wordChars = None):
    """takes a list of words and returns list of unique words and their frequencies"""
    words = wordList(text, wordChars)
    uniqueWords = set(words)
    return sorted([(word, words.count(word)) for word in uniqueWords])
takes a list of words and returns list of unique words and their frequencies
recipes/Python/576699_Pythword_frequency_count_using_sets/recipe-576699.py