Gigi is a clever monkey, living in the zoo, his teacher (animal keeper) recently taught him some knowledge of "0".

In Gigi's eyes, "0" is a character contains some circle(maybe one, maybe two).

So, a is a "0",b is a "0",6 is also a "0"，and 8 have two "0" ,etc...

Now, write some code to count how many "0"s in the text.

Let us see who is smarter? You ? or monkey?

Input always be a string(including words numbers and symbols)，You don't need to verify it, but pay attention to the difference between uppercase and lowercase letters.

Here is a table of characters：

one zeroabdegopq069DOPQR         () <-- A pair of braces as a zerotwo zero%&B8

Output will be a number of "0".

Difficulty: introductory

Starter code:

def countzero(string):
	

Solutions:
def countzero(s):
    return sum(1 if c in 'abdegopq069DOPQR' else 2 if c in '%&B8' else 0 for c in s.replace('()', '0'))

def countzero(string):
    return sum(1 if c in 'abdegopq069DOPQR' else 2 if c in '%&B8' else 0 for c in string) + string.count('()')

def countzero(string):
    return sum(map("abdegopq069DOPQR%&B8%&B8".count, string.replace("()", "0")))

D = {**{c:1 for c in "abdegopq069DOPQR"},
     **{c:2 for c in "%&B8"}}

def countzero(string):
    return sum(D.get(c, string[i:i+2] == '()') for i,c in enumerate(string))

two = "%&B8"
some = f"abdegopq069DOPQR{two}"

def countzero(string):
    return sum(2 if c in two else 1 for c in string.replace("()", "0") if c in some)

ONE_ZERO = 'abdegopq069DOPQR'
TWO_ZERO = '%&B8'
def countzero(string):
    string = string.replace('()', '0')
    return sum(1 if c in ONE_ZERO else 2 if c in TWO_ZERO else 0 for c in string)

zeroes = {}
for c in 'abdegopq069DOPQR':
    zeroes[c] = 1
for c in '%&B8':
    zeroes[c] = 2

def countzero(string):
    string = string.replace('()', '0')
    return sum(map(lambda c: zeroes.get(c, 0), string))

def countzero(string):
    n = 0
    for i in string:
        if i in "069abdeopqDOPQRg(":
            n += 1
        elif i in "8%&B":
            n += 2
        
    return n

countzero = lambda s: sum((c in "%&B8") * 2 + (c in "abdegopq069DOPQR") * 1 for c in s) + s.count("()")

def countzero(string):
    counter = 0
    for x in string:
        if x in 'abdegopq069DOPQR':
            counter += 1
        elif x in '%&B8':
            counter += 2
        else:
            pass
    return counter + string.count('()')