diff --git a/practice1.py b/practice1.py new file mode 100644 index 0000000..6a54051 --- /dev/null +++ b/practice1.py @@ -0,0 +1,5 @@ +def sum_digits(digit): +... return sum(int(x) for x in digit if x.isdigit()) +... +>>> sum_digits('2018a7ps0202g') +