I have a list of strings:
list_of_strgs = ['if a+b > 10 and b+c < 20:',
'if a+b > 10 ||| b+c < 20 &&b<2:',
'x&& &&& and and x or | ||\\|| x']
In the third list, I need to replace the double backslash with a single backslash.
I tried this (see Python regex to replace double backslash with single backslash):
new = [i.replace('\\\\', '\\') for i in list_of_strgs]
This has no effect.
Any ideas what else I could try? Thanks!