Implement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of elements.

For example:

```python
unique_in_order('AAAABBBCCDAABBB') == ['A', 'B', 'C', 'D', 'A', 'B']
unique_in_order('ABBCcAD')         == ['A', 'B', 'C', 'c', 'A', 'D']
unique_in_order([1,2,2,3,3])       == [1,2,3]
```

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def unique_in_order(iterable):
	

Solutions:
def unique_in_order(iterable):
	result = []
	prev = None
	for char in iterable[0:]:
		if char != prev:
			result.append(char)
			prev = char
	return result


from itertools import groupby

def unique_in_order(iterable):
	return [k for (k, _) in groupby(iterable)]


def unique_in_order(iterable):
	res = []
	for item in iterable:
		if len(res) == 0 or item != res[-1]:
			res.append(item)
	return res


unique_in_order = lambda l: [z for (i, z) in enumerate(l) if i == 0 or l[i - 1] != z]


def unique_in_order(iterable):
	r = []
	for x in iterable:
		x in r[-1:] or r.append(x)
	return r


def unique_in_order(iterable):
	k = []
	for i in iterable:
		if k == []:
			k.append(i)
		elif k[-1] != i:
			k.append(i)
	return k


def unique_in_order(iterable):
	return [ch for (i, ch) in enumerate(iterable) if i == 0 or ch != iterable[i - 1]]


from itertools import groupby

def unique_in_order(iterable):
	return [x for (x, _) in groupby(iterable)]


def unique_in_order(iterable):
	unique = []
	last = ''
	for item in iterable:
		if item != last:
			unique.append(item)
			last = item
	return unique


def unique_in_order(it):
	return [it[0]] + [e for (i, e) in enumerate(it[1:]) if it[i] != e] if it else []