Re: Concantenation and string slicing

2006-02-25 Thread Larry Bates
Dennis Lee Bieber wrote: > On Thu, 23 Feb 2006 18:06:46 -0600, Larry Bates > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >> Better was is: >> >> message = raw_input("Enter a message: ") >> print message[::-1] >> > > I sometimes get the feeling a lot of responses t

Re: Concantenation and string slicing

2006-02-23 Thread Larry Bates
DannyB wrote: > I've written a program that takes a phrase and spits it back out > backwards. My problem is it throws each character on a new line. I'd > like the phrase to be on the same line. Is this possible? > > #Backward Message > > message = raw_input("Enter a message: ") > letter = len

Re: Concantenation and string slicing

2006-02-23 Thread CatDude
On Thu, 23 Feb 2006 14:55:16 -0800, DannyB wrote: > I've written a program that takes a phrase and spits it back out > backwards. My problem is it throws each character on a new line. I'd > like the phrase to be on the same line. Is this possible? First suggestion: Put a comma at the end of th

Re: Concantenation and string slicing

2006-02-23 Thread DannyB
Wow - thats simple =). Thanks a ton!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Concantenation and string slicing

2006-02-23 Thread nak
add a dash like shown below >>> print newMessage, -- http://mail.python.org/mailman/listinfo/python-list

Concantenation and string slicing

2006-02-23 Thread DannyB
I've written a program that takes a phrase and spits it back out backwards. My problem is it throws each character on a new line. I'd like the phrase to be on the same line. Is this possible? #Backward Message message = raw_input("Enter a message: ") letter = len(message) while (letter > 0):