CoddeWars Kata - If you can't sleep, just count sheep!!

DESCRIPTION:
If you can't sleep, just count sheep!!

Task:
Given a non-negative integer, 3 for example, return a string with a murmur: "1 sheep...2 sheep...3 sheep...". Input will always be valid, i.e. no negative integers.

def count_sheep( n ):
    return "".join( [ str( i ) + " sheep..." for i in range( 1, n + 1 ) ] 
H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center