ty. that was the decrypt function. i am slo writing an encrypt function. def encrypt(phrase): pattern = re.compile(r"([bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ])") return pattern.sub(r"1\o\1", phrase)
doesnt work though, h becomes 1\\oh. def encrypt(phrase): pattern = re.compile(r"([bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ])") return pattern.sub(r"o\1", phrase) returns oh. i want hoh. i dont quite get it.why cant i delimit pattern with \ -- http://mail.python.org/mailman/listinfo/python-list