I'm trying to delete all digits from a string.
However the next code deletes as well digits contained in any word, and obviously I don't want that.
I've been trying many regular expressions with no success.
Thanks!
s = "This must not b3 delet3d, but t...

Asked By Menda

If I want to find the sum of the digits of a number, i.e. :
Input: 932
Output: 14, which is (9 + 3 + 2)
What is the fastest way of doing this?
I instinctively did:
sum(int(digit) for digit in str(number))
and I found this online:
sum(map(int, str...

Asked By SpFW