def Xor(string, key):
 return ''.join([chr((c ^ key)) for c in bytearray(string)])

def Xor ( string , key ) : return '' . join ( [ chr ( ( c ^ key ) ) for c in bytearray ( string ) ] )
returns a string where each character has been xored with key .