Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import System.Linq.Enumerable
words = ("blueberry", "chimpanzee", "abacus", "banana", "apple", "cheese")
wordGroups = words.GroupBy({ w | w[0] })
for g in wordGroups:
print "Words that start with the letter $(g.Key):"
for word in g: print "\t$word"

This comment has been minimized.

Show comment Hide comment

carlrosenberger Oct 9, 2010



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment