Re: Replacing large number of substrings

2005-09-04 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, Will McGugan <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a simple way of replacing a large number of substrings in a > string? I was hoping that str.replace could take a dictionary and use it > to replace the occurrences of the keys with the dict values, but t

Re: Replacing large number of substrings

2005-09-04 Thread Robert Kern
Will McGugan wrote: > Hi, > > Is there a simple way of replacing a large number of substrings in a > string? I was hoping that str.replace could take a dictionary and use it > to replace the occurrences of the keys with the dict values, but that > doesnt seem to be the case. > > To clarify, so

Re: Replacing large number of substrings

2005-09-04 Thread tiissa
Will McGugan wrote: > Hi, > > Is there a simple way of replacing a large number of substrings in a > string? I was hoping that str.replace could take a dictionary and use it > to replace the occurrences of the keys with the dict values, but that > doesnt seem to be the case. You can look at th

Replacing large number of substrings

2005-09-04 Thread Will McGugan
Hi, Is there a simple way of replacing a large number of substrings in a string? I was hoping that str.replace could take a dictionary and use it to replace the occurrences of the keys with the dict values, but that doesnt seem to be the case. To clarify, something along these lines.. >>> di