Different behaviour of regexp in 3.6.0b2

Peter Otten __peter__ at web.de
Sat Oct 15 04:07:52 EDT 2016


Serhiy Storchaka wrote:

> On 14.10.16 20:01, Peter Otten wrote:

>>>>> def double_bs(s): return "\\\\".join(s.split("\\"))
>> ...

> Just use s.replace('\\', r'\\').

D'oh!




More information about the Python-list mailing list