We've got a message from the **Librarian**. As usual there're many `o` and `k` in it and, as all codewarriors don't know "Ook" language we need that you translate this message.

**tip** : it seems traditional "Hello World!" would look like :
`Ok, Ook, Ooo?  Okk, Ook, Ok?  Okk, Okk, Oo?  Okk, Okk, Oo?  Okk, Okkkk?  Ok, Ooooo?  Ok, Ok, Okkk?  Okk, Okkkk?  Okkk, Ook, O?  Okk, Okk, Oo?  Okk, Ook, Oo?  Ook, Ooook!`

Your task is to implement a function `okkOokOo(okkOookk)`, that would take the `okkOookk` message as input and return a decoded human-readable string.

*eg*:
```python
okkOokOo('Ok, Ook, Ooo!')  # -> 'H'
okkOokOo('Ok, Ook, Ooo?  Okk, Ook, Ok?  Okk, Okk, Oo?  Okk, Okk, Oo?  Okk, Okkkk!')  # -> 'Hello'
okkOokOo('Ok, Ok, Okkk?  Okk, Okkkk?  Okkk, Ook, O?  Okk, Okk, Oo?  Okk, Ook, Oo?  Ook, Ooook!')  # -> 'World!'
```

Source: codewars | Difficulty: EASY
Tags: Bit manipulation

Ad-hoc

Starter code: def okkOokOo(s):
	

Solutions:
SCORE = {'O': '0', 'o': '0', 'k': '1'}

def okkOokOo(s):
	return ''.join((chr(int(''.join((SCORE.get(a, '') for a in word)), 2)) for word in s.split('?')))


def okkOokOo(s):
	letters = s.split('? ')
	result = ''
	for letter in letters:
		sum = 0
		for x in letter:
			if x.lower() == 'o':
				sum = sum * 2 + 0
				continue
			if x.lower() == 'k':
				sum = sum * 2 + 1
				continue
		result += str(unichr(sum))
	return result


TRANS = str.maketrans('Ook', '001', ', !')

def okkOokOo(s):
	return ''.join((chr(int(x, 2)) for x in s.translate(TRANS).split('?')))


okkOokOo = lambda s: ''.join((chr(int(x, 2)) for x in s[:-1].replace(', ', '').upper().replace('O', '0').replace('K', '1').split('? ')))


def count_place(s):
	l = list(s)
	l.reverse()
	c = 0
	for (i, each) in enumerate(l):
		if each == 'o' or each == 'O':
			continue
		if each == 'k':
			c += 2 ** i
	return c

def okkOokOo(s):
	ret = []
	for each in s.split('? '):
		new_s = each.replace(', ', '')
		if new_s[-1] == '!':
			new_s = new_s[:-1]
		location = count_place(new_s)
		ret.append(chr(location))
	return ''.join(ret)


def okkOokOo(s):
	s = s.lower()
	s = s.replace('o', '0')
	s = s.replace('k', '1')
	s = s.replace(',', '')
	s = s.replace(' ', '')
	s = s.replace('!', '')
	bis = s.split('?')
	for i in xrange(len(bis)):
		bis[i] = chr(int(bis[i], 2))
	return ''.join(bis)


def okkOokOo(s):
	s = s.lower().replace(',', '').replace(' ', '').replace('!', '?').replace('o', '0').replace('k', '1').split('?')
	res = ''
	for i in s[:-1]:
		res = res + chr(int(i, base=2))
	return res


import string as st

def okkOokOo(s):
	trans = st.maketrans('Ook', '001')
	return ''.join((chr(int(st.translate(i, trans, ', ?!'), base=2)) for i in s.split('? ')))


def okkOokOo(s):
	s = s[:-1].lower().replace('k', '1').replace('o', '0')
	res = [''.join(x.split(', ')) for x in s.split('? ')]
	return ''.join([chr(int(x, 2)) for x in res])