import sys
def makeVernamCypher( text, key ):
answer = ""
p = 0
for char in text:
answer += chr(ord(char) ^ ord(key[p]))
p += 1
if p==len(key):
p = 0
return answer
text = sys.argv[1]
key = sys.argv[2]
txt = makeVernamCypher(text, key)
print(txt)
Пробую запустить:
cheky@breky:~$ verman.py helloworld asdfgyjkmp