The False’s always come before the True’s, and the number of False’s does not have to equal the number of True’s. I need to replace the last False in the seriesthe third one in my examplewith True. This works
it’s a new function since 11.3 so, actually, this also has been my first use-case combinations of Split, or just regular replace also generally works fine (and faster).
Not sure about the performance of sequence replace, and if it is critical
Good point. My function is restricted in its use and is applied only to situations where there is just one occurrence of the pattern. Your way, however, has an advantage if error-checking for more than one occurrence needs to be built in.
That’s what’s cool about bouncing ideas around: you discover or rediscover approaches that you can use to make your code faster or more reliable and apply to other things.