0
re.sub question
Is there a way to sub two different characters in one line. Here is how I did it to remove brackets from a string. formulas = re.sub("\(","",input()) formulas = re.sub("\)","",formulas).split()
1 Réponse
+ 1
import re
mystring = "hello )world( just a) test("
print(re.sub("[()]", '', mystring))