Re: i get different answers based on run platform

2011-07-07 Thread linda
On Jul 7, 2:42 pm, Ethan Furman wrote: > linda wrote: > > I tried something = input('enter text:').rstrip('\n') as suggested but > > the problem persists.  BTW, the intermediate print commands agree and > > so are not an issue.  The disagreement is in IDLE correctly > > identifying palindromes and

Re: i get different answers based on run platform

2011-07-07 Thread Ethan Furman
linda wrote: I tried something = input('enter text:').rstrip('\n') as suggested but the problem persists. BTW, the intermediate print commands agree and so are not an issue. The disagreement is in IDLE correctly identifying palindromes and Windows not. I do suspect it may be a trailing '\r' is

Re: i get different answers based on run platform

2011-07-07 Thread linda
I tried something = input('enter text:').rstrip('\n') as suggested but the problem persists. BTW, the intermediate print commands agree and so are not an issue. The disagreement is in IDLE correctly identifying palindromes and Windows not. I do suspect it may be a trailing '\r' issue. Is there

Re: i get different answers based on run platform

2011-07-07 Thread MRAB
On 07/07/2011 19:37, John Gordon wrote: In<842fce9d-1b3f-434a-b748-a6dc4828c...@h12g2000pro.googlegroups.com> linda writes: 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

Re: i get different answers based on run platform

2011-07-07 Thread Ethan Furman
John Gordon wrote: By the way, I could not make your program work as you provided it; I had to replace input() with raw_input(). Does it really work for you this way? input() is the 3.x name for raw_input() ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: i get different answers based on run platform

2011-07-07 Thread MRAB
On 07/07/2011 19:18, linda wrote: 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(

Re: i get different answers based on run platform

2011-07-07 Thread Ethan Furman
linda wrote: 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

Re: i get different answers based on run platform

2011-07-07 Thread John Gordon
In <842fce9d-1b3f-434a-b748-a6dc4828c...@h12g2000pro.googlegroups.com> linda writes: > 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: Yo

i get different answers based on run platform

2011-07-07 Thread linda
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)