It looks like you need to XOR each of the characters in the message with the corresponding character in the key. However, for this you need a bit of interconversion with ordand chr, because you can only use xor numbers, not strings:
>>> encrypted = [ chr(ord(a) ^ ord(b)) for (a,b) in zip(var, key) ]
>>> encrypted
['\x1b', '\x10', '\x1c', '\t', '\x1d']
>>> decrypted = [ chr(ord(a) ^ ord(b)) for (a,b) in zip(encrypted, key) ]
>>> decrypted
['h', 'e', 'l', 'l', 'o']
>>> "".join(decrypted)
'hello'
, binascii.a2b_qp("hello") (, ).
, , . , , , itertools.cycle:
>>> from itertools import cycle
>>> var="hello"
>>> key="xy"
>>> encrypted = [ chr(ord(a) ^ ord(b)) for (a,b) in zip(var, cycle(key)) ]
>>> encrypted
['\x10', '\x1c', '\x14', '\x15', '\x17']
>>> decrypted = [ chr(ord(a) ^ ord(b)) for (a,b) in zip(encrypted, cycle(key)) ]
>>> "".join(decrypted)
'hello'
unicode/multi-byte ( ), ( ) , , XOR, - :
>>> var=u"hello\u2764"
>>> var
'hello❤'
>>> encrypted = [ a ^ b for (a,b) in zip(bytes(var, 'utf-8'),cycle(bytes(key, 'utf-8'))) ]
>>> encrypted
[27, 16, 28, 9, 29, 145, 248, 199]
>>> decrypted = [ a ^ b for (a,b) in zip(bytes(encrypted), cycle(bytes(key, 'utf-8'))) ]
>>> decrypted
[104, 101, 108, 108, 111, 226, 157, 164]
>>> bytes(decrypted)
b'hello\xe2\x9d\xa4'
>>> bytes(decrypted).decode()
'hello❤'