Return max consecutive 1s in a binary list. Example: [1,1,0,1,1,1] => 3
Implement this function:
def max_consecutive_ones(lst: list) -> int:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: lst.
Input
[1, 1, 0, 1, 1, 1]
Output
3