fork download
  1. from itertools import cycle
  2.  
  3. print([s if i % 5 == 0 else n for n,s,i
  4. in zip(cycle([1,2,3]), cycle("ab"), range(1,41))])
Runtime error #stdin #stdout 0.08s 10920KB
stdin
Standard input is empty
stdout
Standard output is empty