I have this simple palindrome program that yields different results
depending on whether I run it from Windows or from IDLE.  The answer
is correct off IDLE, but why is this the case?  Here's the code:

def reverse(text):
    return text[::-1]
def is_palindrome(text):
    return text==reverse(text)
while True:
    something=input('enter text:')
    print(something)
    print(something[::-1])
    if (is_palindrome(something)):
        print("yes, it is a palindrome")
        break
    else:
        print("no, it is not a palindrome")
        continue
print ('done')

Thanks for your help.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to