In article <9egld1f38...@mid.individual.net>, Neil Cerutti <ne...@norwich.edu> wrote:
> On 2011-09-28, Chris Angelico <ros...@gmail.com> wrote: > > On Wed, Sep 28, 2011 at 10:28 PM, Xah Lee <xah...@gmail.com> wrote: > >> each string needs to be changed to a unique string, not all to > >> the same string. > > > > And you'll find that this is, by and large, the most normal > > situation. Folding many strings down to one string is a lot > > less common. So, let's have some real-world use cases and then > > we can talk recommendations. > > I'd like to know what "string replacement" is supposed to mean in > the context of Python. You just need to use "string" in the more generic computer-sciency sense, not in the python-data-type sense. s = "I am an immutable string" l = list(s) # now you can pretend strings are mutable do_stuff_to_string(l) s = ''.join(l) -- http://mail.python.org/mailman/listinfo/python-list