Sha256: 18c1c59cdd5f419ce39f8ad4ae19bf2a3313fd7a8895fd387f68663d897b6a84

Contents?: true

Size: 310 Bytes

Versions: 110

Compression:

Stored size: 310 Bytes

Contents

def proverb(rhyme_items):
    if not rhyme_items:
        return ""
    phrases = ['For want of a {0} the {1} was lost.'.format(el1, el2)
               for el1, el2 in zip(rhyme_items, rhyme_items[1:])]
    phrases.append('And all for the want of a {0}.'.format(rhyme_items[0]))
    return '\n'.join(phrases)

Version data entries

110 entries across 110 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/python/exercises/proverb/example.py
trackler-2.2.1.179 tracks/python/exercises/proverb/example.py
trackler-2.2.1.178 tracks/python/exercises/proverb/example.py
trackler-2.2.1.177 tracks/python/exercises/proverb/example.py
trackler-2.2.1.176 tracks/python/exercises/proverb/example.py
trackler-2.2.1.175 tracks/python/exercises/proverb/example.py
trackler-2.2.1.174 tracks/python/exercises/proverb/example.py
trackler-2.2.1.173 tracks/python/exercises/proverb/example.py
trackler-2.2.1.172 tracks/python/exercises/proverb/example.py
trackler-2.2.1.171 tracks/python/exercises/proverb/example.py
trackler-2.2.1.170 tracks/python/exercises/proverb/example.py
trackler-2.2.1.169 tracks/python/exercises/proverb/example.py
trackler-2.2.1.167 tracks/python/exercises/proverb/example.py
trackler-2.2.1.166 tracks/python/exercises/proverb/example.py
trackler-2.2.1.165 tracks/python/exercises/proverb/example.py
trackler-2.2.1.164 tracks/python/exercises/proverb/example.py
trackler-2.2.1.163 tracks/python/exercises/proverb/example.py
trackler-2.2.1.162 tracks/python/exercises/proverb/example.py
trackler-2.2.1.161 tracks/python/exercises/proverb/example.py
trackler-2.2.1.160 tracks/python/exercises/proverb/example.py