def acronym_gen(name): """Return a tuple of the letters that form the acronym for name. >>> acronym_gen('University of California Berkeley') ('U', 'C', 'B') """ return tuple(w[0] for w in name.split() if capitalized(w))
def acronym(name): """Return a tuple of the letters that form the acronym for name. >>> acronym('University of California Berkeley') ('U', 'C', 'B') """ return tuple(map(first, filter(capitalized, name.split())))