import re
text = " Hello,. [world]! ()!"
#r='[’!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~]+'
r='[’!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~\n。!,]+'
line=re.sub(r,'',text)

print(line)
Hello world