我知道逻辑上and
被用于布尔值,当且仅当两个条件都为真时才会评估为真。但是我对以下语句有疑问:
print "ashish" and "sahil"
it prints out "sahil"?
another example:
return s[0] == s[-1] and checker(s[1:-1])
(taken from recursive function for palindrome string
checking
please explain it and other ways and is oveloaded ,especially what the second statement do.