mywords = ['how', 'no', 'because', 'sheep', 'mahogany']
shortest, longest = (w[i] for i in (0, -1) for w in (sorted(mywords, key=len),)
    )
How do i print the longest and shortest words out of a given set of words?