Question: IN PYTHON: ------------------------ b. The stop when generator takes an iterable and a predicate as parameters: it produces every value from the iterable, but stopping
IN PYTHON:
------------------------

b. The stop when generator takes an iterable and a predicate as parameters: it produces every value from the iterable, but stopping (and not producing) the first value for which the predicate returns True. For example for i in stop when('combustible', lambda x : x q') print (i, end-') prints comb: u is the first character greater than q, so it is not included and the generator stops
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
