Skip to main content
added 9 characters in body
Source Link

Python 3, 5858 56 bytes

f=lambda x:[e for i,e in enumerate(x) if max(x[:i+1])==e]

Not sure if the input would be a string or a list, my code only would work in the second case.

Python 3, 58 bytes

f=lambda x:[e for i,e in enumerate(x) if max(x[:i+1])==e]

Not sure if the input would be a string or a list, my code only would work in the second case.

Python 3, 58 56 bytes

f=lambda x:[e for i,e in enumerate(x)if max(x[:i+1])==e]

Not sure if the input would be a string or a list, my code only would work in the second case.

Source Link

Python 3, 58 bytes

f=lambda x:[e for i,e in enumerate(x) if max(x[:i+1])==e]

Not sure if the input would be a string or a list, my code only would work in the second case.