This kata is part of the collection [Mary's Puzzle Books](https://www.codewars.com/collections/marys-puzzle-books).

# Zero Terminated Sum

Mary has another puzzle book, and it's up to you to help her out! This book is filled with zero-terminated substrings, and you have to find the substring with the largest sum of its digits. For example, one puzzle looks like this:
```
"72102450111111090"
```
Here, there are 4 different substrings: `721`, `245`, `111111`, and `9`. The sums of their digits are `10`, `11`, `6`, and `9` respectively. Therefore, the substring with the largest sum of its digits is `245`, and its sum is `11`.

Write a function `largest_sum` which takes a string and returns the maximum of the sums of the substrings. In the example above, your function should return `11`.

### Notes:

- A substring can have length 0. For example, `123004560` has three substrings, and the middle one has length 0.
- All inputs will be valid strings of digits, and the last digit will always be `0`.

Difficulty: introductory

Starter code:

def largest_sum(s):
	

Solutions:
def largest_sum(s):
    return max(sum(map(int,x)) for x in s.split('0'))

def largest_sum(s):
    return max(sum(map(int, e)) for e in s.split('0'))

def largest_sum(s):
    return max(sum(int(i) for i in j) for j in s.split('0'))

def largest_sum(s):
    return max(sum(int(x) for x in n) for n in s.split('0'))

import re
def largest_sum(s):
    s = s.split('0')
    m = 0
    for l in s:
      temp_s = sum(map(int, l))
      if temp_s > m :
        m = temp_s
    return m


def largest_sum(s):
    max_sum = 0
    tmp = 0
    for c in s:
        if c != '0':
            tmp += int(c)
        else:
            max_sum = max(max_sum, tmp)
            tmp = 0
    return max_sum

def largest_sum(s):
    return max(sum(map(int, list(n))) for n in s.split('0'))


def largest_sum(s):
    return max(sum(map(int,i)) for i in s.split("0"))

def largest_sum(s):
  ar = s.split("0")
  max = 0
  for e in ar:
    a = [int(d) for d in e]
    if max < sum(a):
      max = sum(a)
  return max

def largest_sum(s):
    return max(sum(map(int, c)) for c in s.split('0'))