Is there a significant difference in speed, style, or any pythonesque
reasoning between Alan's solution and 
print message[::-1]

Thanks for any information,

Robert


On Wed, 2009-09-23 at 18:51 +0100, Alan Gauld wrote:
> "Ali Sina" <seena_...@yahoo.com> wrote 
> 
> #Message backward printer
> message=input('Enter your message: ')
> 
> for i in range(len(message),0,-1):
> print(message)
> 
> 
> > This is the code which I have written. 
> > All it does is count the number of letters starting from backwards. 
> 
> Correct, plus it prints the original message each time.
> So obviously you need to print something else! If you are counting 
> one letter at a time maybe you should print one letter at a time?
> 
> However/...
> Others have given you a big hint about using slicing instead 
> so I'll leave you to research that yourself.
> 
> 

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to