Reputation: 321
I got a warning regarding depreciation of \D
, how can I update my code? (bellow) to remove the warning?
re.sub("\D", "", value)
Upvotes: 1
Views: 683
Reputation: 321
Solved with
str(value).translate(str.maketrans("", "", string.punctuation))
Upvotes: 1