79616074

Date: 2025-05-11 01:34:19
Score: 1
Natty:
Report link

Using just cycle and the built-in zip you can also just do it like this.

from itertools import cycle

[char for _, char in zip(range(3),cycle(["a","b","c"]))]

This works because zip just stop when an iterator is depleted.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Rathur