fork download
  1. def sum_digits(digit):
  2. return sum(int(x) for x in digit if x.isdigit())
  3.  
  4. print(sum_digits('texto123numero456x7'))
  5.  
  6. #https://pt.stackoverflow.com/q/42280/101
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
28