"3c273" <nospam at nospam.com> writes: > >>> if s and t == '': > print "This doesn't work!" This is really if (s) and (t == '') which evaluates to false since "if (s)" returns false for the empty string.