3 ms·
What benefit does the iterations examples give over just looping through the values and ignoring the undesired values? E.g for the iterator slice: for i,
by wodenokoto 7y ago
What benefit does the iterations examples give over just looping through the values and ignoring the undesired values?
E.g for the iterator slice:
for i, val in enumerate(range(50)):
If 10<= i =< 20:
Print(val)
It has the seem limitations but doesn’t require you or your colleagues to know and learn itertools. It has the same number of lines