Grant Edwards: > No, he explained exactly what he was trying to do, and it had > nothing to do with encryption. He wants to know if exactly one > (1) of the strings is the empty string. BTW, another way to get that is if bool(str1) + bool(str2) == 1: print "one and only one of them was empty" Andrew dalke at dalkescientific.com