79455050

Date: 2025-02-20 15:46:29
Score: 1
Natty:
Report link

This is fairly neat. Doesn't require list size and the generator provides lazy evaluation, no itertools requirement also.

def cycle_through_list(lst):
    while True:
        yield from lst
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: MaxZ