Jul-02-2018, 12:16 PM
more efficient approach
import string def smart_count_digits(my_string): orig_length = len(my_string) for digit in string.digits: my_string = my_string.replace(digit, '') return orig_length - len(my_string)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs