An acrostic is a text in which the first letter of each line spells out a word. It is also a quick and cheap way of writing a poem for somebody, as exemplified below :



Write a program that reads an acrostic to identify the "hidden" word. Specifically, your program will receive a list of words (reprensenting an acrostic) and will need to return a string corresponding to the word that is spelled out by taking the first letter of each word in the acrostic.

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def read_out(acrostic):
	

Solutions:
def read_out(acrostic):
	return ''.join((word[0] for word in acrostic))


def read_out(acrostic):
	return ''.join(next(zip(*acrostic)))


from operator import itemgetter

def read_out(acrostic):
	return ''.join(map(itemgetter(0), acrostic))


def read_out(acrostic):
	return ''.join((e[0] for e in acrostic))


def read_out(acrostic):
	return ''.join((w[0] for w in acrostic))


def read_out(acrostic):
	return ''.join((s[0] for s in acrostic))


def read_out(array):
	acrostic = ''
	for word in array:
		acrostic += word[0]
	return acrostic
read_out = lambda a: ''.join((w[0] for w in a))
read_out = lambda a: ''.join([w[0] for w in a])


def read_out(acr):
	return ''.join(map(lambda a: a[0], acr))


def read_out(a):
	return ''.join((c[0] for c in a))


def read_out(acrostic):
	return ''.join((i[0] for i in acrostic)).upper()