• + 4 comments

    The shortest method for the above python code

    return sum(1 for x in range(len(s)) if sum(s[x:x+m]) == d)