A bitstring (str
) is pattern that only consists of zeroes (0
) and ones (0
).
Write a function bitmask
that takes two string (str
) arguments: a string str
) and a bitstring str
) obtained by encoding
>>> bitmask('Hello, world!', '00101010')
'bOFFE\x06\n]EXFN\\x0b'
>>> bitmask('bOFFE\x06\\n]EXFN\x0b', '00101010')
'Hello, world!'