You're almost there.
All you need to do now, is to loop through the list of int values, adding each one to a total, until you hit your separators, then append the total to a new list, reset the total to zero, and go again. Once that's done, you can use the
Hint:
All you need to do now, is to loop through the list of int values, adding each one to a total, until you hit your separators, then append the total to a new list, reset the total to zero, and go again. Once that's done, you can use the
max()
function, on the totals list, to get the max value.Hint:
for number in newList: print(number)That's how I would do it, but I'm sure there's more than one way.
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein