Help with String Manipulation

Darrell news at
Wed Jun 23 02:25:04 CEST 1999

>>> s='now is the time'
>>> l=list(s)
>>> l.reverse()
>>> l
['e', 'm', 'i', 't', ' ', 'e', 'h', 't', ' ', 's', 'i', ' ', 'w', 'o', 'n']
>>> import string
>>> string.join(l,'')
'emit eht si won'

Samuel G. Williams <samw at> wrote in message
news:0UUb3.1337$el4.44932 at
> I know this is a very stupid question and one that has been addressed
> within available documentation, however I need a quick hand. I am in need
> of a routine to reverse the order of a string. I have tried several things
> that have resulted in failures. It is really stupid, but I am just
> learning python. I can do this readily in C, perl, tcl, but am at a loss.
> I would appreciate any help I can get.
> Thanks in advance.
> --
> Sam Williams  wb5yni samurai at
> Senior IS Staff Specialist         samw at
> --------------------------------------------------------------------------
> Thinking of running your critical apps on NT?
> Isn't there enough world suffering?

More information about the Python-list mailing list