Is it a good idea to check for odd/even length of a palindrome number/string? Most snippets I came across don't do this basic test. If length is even, it can't be a palindrome, no?
if len(var) % 2 != 0:
# could be a palindrome, continue...
else:
break
Or is it just better (i.e faster) to start comparing the first and last numbers/letters directly?
Edit: Okay, stupid question, should've thought twice! :)