Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
while(while)+list.pop(0) solution in Clear category for Beat The Previous by alterGNU
def beat_previous(string):
L=[*string]
x=[int(L.pop(0))]
while L:
d=L.pop(0)
while x[-1]>=int(d) and L:d+=L.pop(0)
if int(d)>x[-1]:x+=[int(d)]
return x
Dec. 6, 2023