## Description

Welcome, Warrior! In this kata, you will get a message and you will need to get the frequency of each and every character!

## Explanation

Your function will be called `char_freq`/`charFreq`/`CharFreq` and you will get passed a string, you will then return a dictionary (object in JavaScript) with as keys the characters, and as values how many times that character is in the string. You can assume you will be given valid input. 

## Example

```python
char_freq("I like cats") // Returns {'a': 1, ' ': 2, 'c': 1, 'e': 1, 'I': 1, 'k': 1, 'l': 1, 'i': 1, 's': 1, 't': 1}
```

Source: codewars | Difficulty: EASY

Starter code: def char_freq(message):
	

Solutions:
from collections import Counter

def char_freq(message):
	return Counter(message)


from collections import Counter as char_freq


def char_freq(message):
	result = {}
	for letter in message:
		result[letter] = result.get(letter, 0) + 1
	return result


def char_freq(message):
	return {ch: message.count(ch) for ch in message}


def char_freq(message):
	f = {}
	for char in list(message):
		if char in f:
			f[char] += 1
		else:
			f[char] = 1
	return f


def char_freq(message):
	return {char: message.count(char) for char in message}


def char_freq(message):
	chars = {}
	for char in message:
		chars[char] = chars.get(char, 0) + 1
	return chars


def char_freq(message):
	(chars, counts) = (list(), list())
	for c in message:
		if c not in chars:
			chars.append(c)
			counts.append(message.count(c))
	return dict(zip(chars, counts))


def char_freq(message):
	frequencies = {}
	for char in message:
		if char in frequencies:
			frequencies[char] += 1
		else:
			frequencies[char] = 1
	return frequencies


def char_freq(message):
	return {e: message.count(e) for e in message}


def char_freq(message):
	dict = {}
	for e in message:
		keys = dict.keys()
		if e in keys:
			dict[e] += 1
		else:
			dict[e] = 1
	return dict


def char_freq(message):
	pass
	text = list(message)
	dic = {}
	for x in message:
		dic[x] = text.count(x)
	return dic


from collections import defaultdict

def char_freq(message):
	res = defaultdict(int)
	for c in message:
		res[c] += 1
	return res


import collections
char_freq = collections.Counter


def char_freq(message):
	return {x: message.count(x) for x in list(message)}


def char_freq(message):
	b = {}
	for a in message:
		b.setdefault(a, 0)
		b[a] = b[a] + 1
	return b


def char_freq(m):
	d = dict()
	for i in m:
		d[i] = m.count(i)
	return d


from collections import defaultdict

def char_freq(message):
	frequency = defaultdict(lambda : 0)
	for letter in list(message):
		frequency[letter] += 1
	return frequency


def char_freq(message):
	unique = set(message)
	freq = dict(list(zip(unique, [0] * len(unique))))
	for s in message:
		freq[s] += 1
	return freq


from itertools import groupby

def char_freq(message):
	return {x: len(list(gp)) for (x, gp) in groupby(sorted(message))}


def char_freq(message):
	dic = {}
	for each in message:
		try:
			if dic[each]:
				dic[each] += 1
		except KeyError:
			dic[each] = 1
	return dic


def char_freq(message):
	s = set(message)
	n = [message.count(i) for i in s]
	return dict(zip(s, n))


from collections import Counter as c

def char_freq(m):
	return dict(c(m))


from collections import Counter

def char_freq(message):
	return dict(Counter(list(message)))


char_freq = lambda s: {e: s.count(e) for e in set(s)}


def char_freq(message):
	return dict(zip(list(message), [message.count(c) for c in message]))


import collections

def char_freq(message):
	return collections.Counter(message)
import collections

def char_freq(message):
	letters = collections.defaultdict(int)
	for letter in message:
		letters[letter] += 1
	return letters


from typing import Dict

def char_freq(message: str) -> Dict[int, str]:
	return dict([(_, message.count(_)) for _ in sorted(set(message))])


def char_freq(message):
	count = {}
	for character in message:
		count.setdefault(character, 0)
		count[character] += 1
	return count


char_freq = lambda m, counter=__import__('collections').Counter: counter(m)


def char_freq(message):
	return {m: message.count(m) for m in message}


char_freq = lambda m: {i: list(m).count(i) for i in set(m)}


char_freq = lambda m: {c: m.count(c) for c in m}


char_freq = lambda message: {x: message.count(x) for x in message}


def char_freq(m):
	s = list(m)
	k = set(s)
	v = list(map(lambda x: s.count(x), k))
	return dict(zip(k, v))


lets = "().!?,-' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ"

def char_freq(message):
	retDict = {}
	for l in lets:
		if message.count(l) > 0:
			retDict[l] = message.count(l)
	return retDict


def char_freq(message):
	ABC = 'abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ'
	count = []
	letters = []
	for l in message:
		c = message.count(l)
		if c > 0:
			count.append(c)
			letters.append(l)
	return dict(zip(letters, count))
	pass


def char_freq(m):
	o = {}
	for i in range(0, len(m)):
		if not o.get(m[i]):
			o[m[i]] = 1
		else:
			o[m[i]] = o[m[i]] + 1
	return o


char_freq = __import__('collections').Counter


def char_freq(string):
	my_dict = {}
	for s in string:
		n = string.count(s)
		my_dict[s] = n
	return my_dict


def char_freq(message):
	char = {}
	for i in message:
		if i in char:
			char[i] += 1
		else:
			char[i] = 1
	return char


def char_freq(message):
	characters = {}
	for char in message:
		characters[char] = characters.get(char, 0) + 1
	return characters


def char_freq(message):
	frequency_table = {}
	for char in message:
		frequency_table[char] = frequency_table.get(char, 0) + 1
	return frequency_table


def char_freq(message):
	str_ = {}
	for i in message:
		if i in str_:
			str_[i] += 1
		else:
			str_[i] = 1
	return str_


def char_freq(message):
	chars = list(message)
	counts = [message.count(char) for char in chars]
	return {chars[i]: counts[i] for i in range(len(chars))}


def char_freq(message):
	dct = {}
	for key in message:
		dct[key] = message.count(key)
	return dct


def char_freq(message):
	dict = {}
	characters = []
	for letter in message:
		if letter not in characters:
			characters.append(letter)
			dict[letter] = message.count(letter)
	return dict


def char_freq(message):
	arr = []
	dict = {}
	for i in message:
		arr.append(i)
	for i in arr:
		arr.count(i)
		dict[i] = arr.count(i)
	return dict


def char_freq(message):
	freqs = {}
	index = 0
	while index < len(message):
		if message[index] not in list(freqs.keys()):
			freqs[message[index]] = 1
		else:
			freqs[message[index]] += 1
		index += 1
	return freqs


def char_freq(message):
	my_dict = {}
	for i in message:
		my_dict[i] = my_dict.get(i, 0) + 1
	return my_dict


def char_freq(message):
	dict = {}
	chars = set(message)
	for char in chars:
		dict[char] = message.count(char)
	return dict


def char_freq(message):
	char_list = [str(a) for a in message]
	return {x: char_list.count(x) for x in char_list}


def char_freq(message):
	dict = {}
	for char in message:
		dict[char] = 0
	for char in message:
		dict[char] = dict[char] + 1
	return dict


def char_freq(message):
	l = {}
	for n in message:
		l[n] = message.count(n)
		n.replace(n, '')
	return l


def char_freq(message):
	message = sorted(list(message))
	d = {message[i]: message.count(message[i]) for i in range(len(message))}
	return d


def char_freq(message):
	dict = {}
	for i in message:
		if i in dict:
			dict[i] = dict[i] + 1
		else:
			dict[i] = 1
	return dict


def char_freq(message):
	char_list = list(message)
	keys = set(char_list)
	map = {}
	for key in keys:
		map[key] = char_list.count(key)
	return map


def char_freq(message):
	dictCh = {}
	for ch in message:
		if ch not in dictCh.keys():
			dictCh[ch] = 1
		else:
			dictCh[ch] += 1
	return dictCh


def char_freq(message):
	arr = [*message]
	_dict = {}
	for i in arr:
		_dict[i] = _dict.get(i, 0) + 1
	return _dict


def char_freq(message):
	char = {}
	for c in message:
		if c in char:
			char[c] += 1
		else:
			char[c] = 1
	return char


from collections import defaultdict, Counter

def char_freq(message):
	my_dict = {}
	for letter in message:
		my_dict[letter] = my_dict.get(letter, 0) + 1
	return my_dict


def char_freq(message):
	a = {}
	for i in message:
		if i not in a:
			a.setdefault(i, 1)
		else:
			a[i] += 1
	return a


def char_freq(message):
	r = {}
	for m in message:
		r[m] = r.get(m, 0) + 1
	return r


def char_freq(message):
	d = dict.fromkeys(message, 0)
	for string in message:
		d[string] += 1
	return d


def char_freq(message):
	char_dict = {}
	for letter in message:
		if letter not in char_dict:
			char_dict[letter] = 1
		else:
			char_dict[letter] = char_dict[letter] + 1
	return char_dict


def char_freq(msg):
	res = {}
	for c in msg:
		try:
			res[c] += 1
		except KeyError:
			res[c] = 1
	return res


def char_freq(message):
	liste = []
	dict = {}
	liste_count = [message.count(letter) for letter in message]
	for letter in message:
		liste.append(letter)
	i = 0
	for i in range(0, len(liste)):
		dict[liste[i]] = liste_count[i]
		i += 1
	return dict


def char_freq(message):
	return dict(map(lambda letter: (letter, message.count(letter)), message))


def char_freq(message):
	return {chr: message.count(chr) for chr in message}


def char_freq(message):
	chars = {}
	for char in message:
		try:
			chars[char] = 1 + chars[char]
		except:
			chars[char] = 1
	return chars


def char_freq(message):
	dict = {}
	for x in message:
		if not x in dict:
			dict[x] = 1
		else:
			dict[x] += 1
	return dict


def char_freq(message):
	print(message)
	d = dict()
	for c in message:
		d[c] = d.get(c, 0) + 1
	sorted_dict = dict(sorted(d.items(), key=lambda item: item[0]))
	return sorted_dict


def char_freq(message):
	a = {}
	for i in message:
		if i not in a:
			a[i] = 0
		a[i] += 1
	return a


def char_freq(message):
	r = {}
	for x in message:
		r[x] = r.get(x, 0) + 1
	return r


def char_freq(message):
	result = {}
	for character in message:
		if character in result:
			result[character] += 1
		else:
			result[character] = 1
	return result


def char_freq(message):
	x = {}
	for i in range(len(message)):
		x[message[i]] = message.count(message[i])
	return x


def char_freq(message):
	diccionario = {}
	for x in message:
		if x in diccionario:
			diccionario[x] += 1
		else:
			diccionario[x] = 1
	return diccionario


def char_freq(message):
	msgL = list(message)
	msgD = dict.fromkeys(msgL)
	for i in msgL:
		if msgD[i] is None:
			msgD[i] = 0
		msgD[i] += 1
	return msgD


def char_freq(message):
	d = dict()
	chars = list(message)
	for char in chars:
		d[char] = d.get(char, 0) + 1
	return d


def char_freq(message):
	set(message)
	character_counts = {}
	for i in set(message):
		count = message.count(i)
		character_counts[i] = count
	return character_counts
	pass


def char_freq(message):
	d = {}.fromkeys(set(list(message)), 0)
	for i in message:
		d[i] += 1
	return d


def char_freq(message):
	solution = {}
	for c in message:
		if c in solution:
			solution[c] += 1
			continue
		solution[c] = 1
	return solution


def char_freq(message):
	freq = {}
	for c in message:
		if not c in freq:
			freq[c] = 0
		freq[c] += 1
	return freq


def char_freq(message):
	out = {}
	for el in message:
		if el not in out.keys():
			out[el] = 1
		else:
			out[el] += 1
	return out


def char_freq(n):
	d = {}
	for i in n:
		d[i] = n.count(i)
	return d


def char_freq(message):
	count = {}
	for n in message:
		if count.get(n) != None:
			count[n] = count[n] + 1
		else:
			count[n] = 1
	return count


from collections import Counter

def char_freq(message: str) -> dict:
	return dict(Counter((c for c in message)))


import collections

def char_freq(message):
	hashing = collections.defaultdict(int)
	for i in message:
		hashing[i] += 1
	return hashing


def char_freq(message):
	a = list(dict.fromkeys(message))
	dicts = {}
	for x in a:
		dicts[x] = message.count(x)
	return dicts


def char_freq(message):
	arr = list(message)
	arr = list(dict.fromkeys(arr))
	res = {}
	for i in arr:
		res[i] = message.count(i)
	return res


def char_freq(message):
	res = {}
	for v in message:
		if v not in res:
			res[v] = message.count(v)
	return res


def char_freq(message):
	d = {}
	for s in message:
		if s not in d:
			d[s] = 1
		else:
			d[s] = d[s] + 1
	return d


def char_freq(message):
	print(message)
	chars = {}
	for char in range(len(message)):
		if message[char] not in chars:
			chars[message[char]] = 1
		else:
			chars[message[char]] = chars[message[char]] + 1
	return chars


def char_freq(message):
	cnt = dict()
	for ch in list(message):
		print('ch : ', ch)
		if ch in cnt:
			cnt[ch] += 1
		else:
			cnt[ch] = 1
	return cnt


def char_freq(message):
	words = dict()
	for i in message:
		words[i] = words.get(i, 0) + 1
	return words
	pass


def char_freq(message):
	dct = {}
	for char in message:
		dct[char] = dct.get(char, 0) + 1
	return dct