<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def xor(s, pad):
    '''XOR a given string ``s`` with the one-time-pad ``pad``'''
    from itertools import cycle
    s = bytearray(force_bytes(s, encoding='latin-1'))
    pad = bytearray(force_bytes(pad, encoding='latin-1'))
    return binary_type(bytearray(x ^ y for x, y in zip(s, cycle(pad))))