Python 3, 58 bytes
Working on golfing it down.
I know there are already other Python answers, but I thought I'd post this one too seeing as it scores pretty well compared to the others, despite being a full function and not a lambda.
Takes input as function parameters, and prints to STDOUT.
def f(s,n,i=0):
for c in s:print(end=[c,c*n][i%n<1]);i+=1
FlipTack
- 14.7k
- 3
- 56
- 102