In this kata you will be given a random string of letters and tasked with returning them as a string of comma-separated sequences sorted alphabetically, with each sequence starting with an uppercase character followed by `n-1` lowercase characters, where `n` is the letter's alphabet position `1-26`.

## Example

```python
alpha_seq("ZpglnRxqenU") -> "Eeeee,Ggggggg,Llllllllllll,Nnnnnnnnnnnnnn,Nnnnnnnnnnnnnn,Pppppppppppppppp,Qqqqqqqqqqqqqqqqq,Rrrrrrrrrrrrrrrrrr,Uuuuuuuuuuuuuuuuuuuuu,Xxxxxxxxxxxxxxxxxxxxxxxx,Zzzzzzzzzzzzzzzzzzzzzzzzzz"
```

## Technical Details

- The string will include only letters.
- The first letter of each sequence is uppercase followed by `n-1` lowercase.
- Each sequence is separated with a comma.
- Return value needs to be a string.

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Data structures

Starter code: def alpha_seq(string):
	

Solutions:
def alpha_seq(s):
	return ','.join(((c * (ord(c) - 96)).capitalize() for c in sorted(s.lower())))


def alpha_seq(string):
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	output = ''
	for s in ''.join(sorted(string.lower())):
		output += s.upper()
		output += s * alpha.find(s)
		output += ','
	return output.strip(',')


def alpha_seq(string):
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	string = string.lower()
	l = []
	for i in sorted(string):
		l.append(i.capitalize() + i * alpha.find(i))
	return ','.join(l)


alpha_seq = lambda s: ','.join((e.upper() + e * (ord(e) - 97) for e in sorted(s.lower())))


def alpha_seq(string):
	o = ord('a') - 1
	return ','.join(((c * (ord(c) - o)).capitalize() for c in sorted(string.lower())))


def elongate(c):
	u = c.upper()
	return '{0}{1}'.format(u, c.lower() * (ord(u) - 65))

def alpha_seq(s):
	return ','.join(sorted([elongate(c) for c in s]))


def alpha_seq(string):
	return ','.join((a * (ord(a) - 96) for a in sorted(string.lower()))).title()


def alpha_seq(string):
	(memo, output) = ({}, [])
	for char in sorted(string.lower()):
		if char not in memo:
			memo[char] = char.upper() + char * (ord(char) - 97)
		output.append(memo[char])
	return ','.join(output)


from string import ascii_lowercase
pos = {x: i for (i, x) in enumerate(ascii_lowercase)}

def alpha_seq(string):
	return ','.join((x.upper() + x.lower() * pos[x] for x in sorted(string.lower())))


alpha_seq = lambda s: ','.join((c.upper() + c * (ord(c) - 97) for c in sorted(s.lower())))