Mutable String

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pierre Thibault

    #1

    Mutable String

    I would like to know if there are modules offering a mutable version of
    strings in Python?

  • Scott David Daniels

    #2
    Re: Mutable String

    Pierre Thibault wrote:[color=blue]
    > I would like to know if there are modules offering a mutable version of
    > strings in Python?[/color]

    Nope. But, for some uses:
    import array
    stringish = array.array{'c' , 'Whatever, kiddo!')
    stringish[-6:-1] = array.array('c' , 'dudes')
    print stringish.tostr ing()
    --
    -Scott David Daniels
    scott.daniels@a cm.org

    Comment

    • Pierre Thibault

      #3
      Re: Mutable String

      Ok,

      That will do the job. Thank you.

      Comment

      Working...