Guest User

Untitled

a guest
Dec 10th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. What code goes in the underlined gap in the function below so that the function always returns the index in the list data of the first element equal to item or -1 if there is no such element. To ensure your answer will match the stored answer(s), use single spaces between operators and operands, e.g. "a >= b or b <= 3", not, say, "a>=b or b<=3".
  2. def index_of_first_match(data, item): i = 0 while ________________________: i += 1 if i == len(data): return -1 else: return i
Add Comment
Please, Sign In to add comment