PY-7
Stop at the First Marker
Task
Write stop_at_marker(values, marker). Read values from left to right and stop
at the first value equal to marker.
Return a three-item tuple:
(consumed, marker_position, found)
consumedis a list containing the values before the first marker.marker_positionis the marker's index, orNonewhen no marker is present.foundisTruewhen a marker is present andFalseotherwise.
If the marker is absent, consumed must contain every input value. Do not
change the input list.
Example
The value after "STOP" is not part of the consumed prefix.
Your implementation
Edit solution.py and keep this function name and signature:
Use a left-to-right loop so the stopping decision remains visible. Return the required tuple; do not print it or ask for input.