You'll be given a string of random characters (numbers, letters, and symbols). To decode this string into the key we're searching for: 

(1) count the number occurences of each ascii lowercase letter, and

(2) return an ordered string, 26 places long, corresponding to the number of occurences for each corresponding letter in the alphabet.

For example:
```python
'$aaaa#bbb*cc^fff!z' gives '43200300000000000000000001'
   ^    ^   ^  ^  ^         ^^^  ^                   ^
  [4]  [3] [2][3][1]        abc  f                   z
  
'z$aaa#ccc%eee1234567890' gives '30303000000000000000000001'
 ^  ^   ^   ^                    ^ ^ ^                    ^
[1][3] [3] [3]                   a c e                    z
```
Remember, the string returned should always be 26 characters long, and only count lowercase letters. 

Note: You can assume that each lowercase letter will appears a maximum of 9 times in the input string.

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def decrypt(test_key):
	

Solutions:
from collections import Counter
from string import ascii_lowercase

def decrypt(test_key):
	cnt = Counter(test_key)
	return ''.join((str(cnt[a]) for a in ascii_lowercase))


def decrypt(test_key):
	return ''.join((str(test_key.count(char)) for char in 'abcdefghijklmnopqrstuvwxyz'))


def decrypt(test_key):
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	s = ''
	for n in alpha:
		s += str(test_key.count(n))
	return s


from collections import Counter
from string import ascii_lowercase

def decrypt(test_key):
	return ''.join(map(str, map(Counter(test_key).__getitem__, ascii_lowercase)))


from collections import Counter
from string import ascii_lowercase

def decrypt(test_key):
	c = Counter(test_key)
	return ''.join((str(c[x]) for x in ascii_lowercase))


def decrypt(test_key):
	return ''.join((str(test_key.count(c)) for c in 'abcdefghijklmnopqrstuvwxyz'))


def decrypt(key):
	return ''.join((str(key.count(c)) for c in 'abcdefghijklmnopqrstuvwxyz'))


decrypt = lambda s: ''.join((str(s.count(chr(c))) for c in range(97, 123)))


def decrypt(test_key):
	alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	key = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
	for i in alphabet:
		index = alphabet.index(i)
		key[index] = str(test_key.count(i))
	return ''.join(key)