Reversing a string

Stefan Behnel stefan.behnel-n05pAM at
Wed Jun 27 19:07:29 CEST 2007

Scott wrote:
> So how on earth would be the best way to: Write a function that takes a 
> string as an argument and outputs the letters backward, one per line.


Anyway, what about:

  for c in string[::-1]:
      print c


More information about the Python-list mailing list