0
How to replace all wildcards to "_"
I want to replace "*Ă+)(Ă·-+%$#@ <>!" Into "_" eg. a = "name* abince k a*" into a = "name__abince_k_a' Please help
1 Answer
+ 3
use regular expression
import re
a="a*b&c"
b=re.sub("[^a-zA-Z0-9]","_",a)
print (b)