# Story

You and a group of friends are earning some extra money in the school holidays by re-painting the numbers on people's letterboxes for a small fee.

Since there are 10 of you in the group each person just concentrates on painting one digit! For example, somebody will paint only the ```1```'s, somebody else will paint only the ```2```'s and so on...

But at the end of the day you realise not everybody did the same amount of work.

To avoid any fights you need to distribute the money fairly. That's where this Kata comes in.

# Kata Task

Given the ```start``` and ```end``` letterbox numbers, write a method to return the frequency of all 10 digits painted.

# Example

For ```start``` = 125, and ```end``` = 132

The letterboxes are
* 125 = ```1```, ```2```, ```5```
* 126 = ```1```, ```2```, ```6```
* 127 = ```1```, ```2```, ```7```
* 128 = ```1```, ```2```, ```8```
* 129 = ```1```, ```2```, ```9```
* 130 = ```1```, ```3```, ```0```
* 131 = ```1```, ```3```, ```1```
* 132 = ```1```, ```3```, ```2```

The digit frequencies are 1 x ```0```, 9 x ```1```, 6 x ```2``` etc...

and so the method would return ```[1,9,6,3,0,1,1,1,1,1]```

# Notes

* 0 < ```start``` <= ```end```
* In C, the returned value will be free'd.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def paint_letterboxes(start, finish):
	

Solutions:
def paint_letterboxes(start, finish):
	xs = [0] * 10
	for n in range(start, finish + 1):
		for i in str(n):
			xs[int(i)] += 1
	return xs


from collections import Counter

def paint_letterboxes(s, f):
	a = Counter(''.join(map(str, range(s, f + 1))))
	return [a[x] for x in '0123456789']


def paint_letterboxes(start, finish):
	painted = ''.join(map(str, range(start, finish + 1)))
	return [painted.count(digit) for digit in '0123456789']


def paint_letterboxes(start, finish):
	return [''.join(map(str, range(start, finish + 1))).count(str(i)) for i in range(10)]


def paint_letterboxes(start, finish):
	s = ''.join([str(x) for x in range(start, finish + 1)])
	return [s.count(str(i)) for i in range(10)]


from collections import Counter

def paint_letterboxes(start, finish):
	counter = Counter(''.join(map(str, range(start, finish + 1))))
	return [counter[str(n)] for n in range(10)]


def paint_letterboxes(start, finish):
	boxes = ''.join([str(b) for b in range(start, finish + 1)])
	return [boxes.count(n) for n in '0123456789']


def paint_letterboxes(start, finish):
	frequencies = [0] * 10
	for i in range(start, finish + 1):
		for d in str(i):
			frequencies[int(d)] += 1
	return frequencies


def paint_letterboxes(start, finish):
	lst = []
	for x in range(start, finish + 1):
		lst.append(x)
	letterboxes = [int(i) for i in ''.join((str(x) for x in lst))]
	return [letterboxes.count(i) for i in range(10)]