Change first occurrence of character x in a string - how?

rust buckett rust at thisisnotreal.com
Mon Feb 15 13:08:48 EST 2021


Grant Edwards <grant.b.edwards at gmail.com> wrote:
> On 2021-02-14, Mr Flibble <flibble at i42.REMOVETHISBIT.co.uk> wrote:
>> On 14/02/2021 21:14, Chris Green wrote:
>>> What's the easiest way to change the first occurrence of a specified
>>> character in a string?
>>
>> By using a grown up (i.e. non-toy) programming language.
> 
> <plonk>
> 
> [gotta love slrn's scoring feature...]
> 

Yep. That's gonna save me some time.


More information about the Python-list mailing list