recentpopularlog in
« earlier  
python - How do I know if a generator is empty from the start? - Stack Overflow
def peek(iterable):
try:
first = next(iterable)
except StopIteration:
return None
return first, itertools.chain([first], iterable)
9 weeks ago
« earlier      
per page:    204080120160

Copy this bookmark:





to read