This time no story, no theory. The examples below show you how to write function `accum`:

**Examples:**
```
accum("abcd") -> "A-Bb-Ccc-Dddd"
accum("RqaEzty") -> "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"
accum("cwAt") -> "C-Ww-Aaa-Tttt"
```

The parameter of accum is a string which includes only letters from `a..z` and `A..Z`.

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Ad-hoc

Starter code: def accum(s):
	

Solutions:
def accum(s):
	return '-'.join((c.upper() + c.lower() * i for (i, c) in enumerate(s)))


def accum(s):
	return '-'.join(((a * i).title() for (i, a) in enumerate(s, 1)))


def accum(s):
	output = ''
	for i in range(len(s)):
		output += s[i] * (i + 1) + '-'
	return output.title()[:-1]


def accum(s):
	i = 0
	result = ''
	for letter in s:
		result += letter.upper() + letter.lower() * i + '-'
		i += 1
	return result[:len(result) - 1]


def accum(s):
	return '-'.join([(j * (i + 1)).capitalize() for (i, j) in enumerate(s)])


def accum(s):
	value = ''
	for (i, c) in enumerate(s):
		value += c.upper() + c.lower() * i + '-'
	return value[:-1]


def accum(s):
	str = ''
	for i in range(0, len(s)):
		str += s[i].upper()
		str += s[i].lower() * i
		if i != len(s) - 1:
			str += '-'
	return str


def accum(s):
	a = list(s)
	res = ''
	for (i, c) in enumerate(a):
		res += c * (i + 1) + '-'
	return res.strip('-').title()


def accum(s):
	return '-'.join(list((x.upper() + x.lower() * count for (count, x) in enumerate(s))))