DEV Community

loading...

Discussion on: Daily Challenge #40 - Counting Sheep

Collapse
tolgahanuzun profile image
Tolgahan ÜZÜN • Edited

Welcome to my fantasy world. :D

n = 5

''.join(list(map(lambda x: f'{x+1} sheep... ', range(n))))

Output:

1 sheep... 2 sheep... 3 sheep... 4 sheep... 5 sheep...