I always liked this - takes out the list/join: >baz = "aabbcc" > baz[::-1] 'ccbbaa'
Kenny On Mar 1, 8:05 am, Istvan Albert <istvan.alb...@gmail.com> wrote: > On Mar 1, 10:23 am, Christopher Lee <l...@chem.ucla.edu> wrote: > > > Hi Istvan, > > I guess just using standard Python reverse() is the simplest, i.e. assuming > > s is a sequence object: > > > l = list(str(s)) > > l.reverse() > > revstr = ''.join(l) > > Ok, I added that as example. thanks. > > best, > > Istvan -- You received this message because you are subscribed to the Google Groups "pygr-dev" group. To post to this group, send email to pygr-...@googlegroups.com. To unsubscribe from this group, send email to pygr-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pygr-dev?hl=en.