Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
F clear one liner return sum(map(int, filter(str.isdigit, text.split()))) with 4 lines of comments solution in Clear category for Sum Numbers by piter239
def sum_numbers(text: str) -> int:
''' four easy steps:
1) split into words - split()
2) check if it is number str.isdigit()
3) transform into integer int()
4) sum '''
return sum(map(int, filter(str.isdigit, text.split())))
April 21, 2020
Comments: