You are given a set of `n` segments on the axis `Ox`, each segment has integer endpoints between `0` and `m` inclusive.
 Segments may intersect, overlap or even coincide with each other. Each segment is characterized by two integers li and ri — coordinates of the left and of the right endpoints.

 Consider all integer points between `0` and `m` inclusive. Your task is to print all such points that don't belong to any segment. The point x belongs to the segment `[l;r]` if and only if `l ≤ x ≤ r`.

**Input:**
 `m` — the upper bound for coordinates;
 array of coordinates li and ri `0 ≤ li ≤ ri ≤ m` — the endpoints of the `i`-th segment. Segments may intersect, overlap or even coincide with each other.

**Output:**
 All points from `0` to `m` that don't belong to any segment.

**Examples:**
```python
segments(5, [(2,2),(1,2),(5,5)]) => [0,3,4]
segments(7, [(0,7)]) => []
```

Difficulty: EASY
Starter code: def segments(m, a):
	

Solutions:
def segments(m, arr):
	return [i for i in range(m + 1) if not any((a <= i <= b for (a, b) in arr))]


def segments(m, a):
	vals = set(range(m + 1))
	for (st, en) in a:
		vals -= set(range(st, en + 1))
	return sorted(vals)


def segments(m, a):
	return [p for p in range(m + 1) if all((not x[0] <= p <= x[1] for x in a))]


def segments(m, a):
	occupied = []
	for i in a:
		for x in range(i[0], i[1] + 1):
			occupied.append(x)
	free = []
	for n in range(0, m + 1):
		if n not in occupied:
			free.append(n)
	return free


def segments(m, a):
	return [i for i in range(m + 1) if not any([i in range(x[0], x[1] + 1) for x in a])]


def segments(m, a):
	new_list = []
	for sub_list in a:
		new_list = new_list + list(range(sub_list[0], sub_list[1] + 1))
	new_set = set(new_list)
	expected_set = set(range(0, m + 1))
	return sorted(list(expected_set.difference(new_set)))


def segments(m, a):
	segments = {n for (l, r) in a for n in range(l, r + 1)}
	return [n for n in range(m + 1) if n not in segments]


from functools import reduce
from itertools import filterfalse

def segments(m, a):
	return list(filterfalse(reduce(set.union, (set(range(x, y + 1)) for (x, y) in a), set()).__contains__, range(0, m + 1)))


def segments(m, a):
	answer = [i for i in range(m + 1)]
	for i in a:
		for j in range(i[0], i[1] + 1):
			try:
				answer.remove(j)
			except ValueError:
				pass
	return answer