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.139 tracks/python/exercises/proverb/example.py
trackler-2.2.1.138 tracks/python/exercises/proverb/example.py
trackler-2.2.1.137 tracks/python/exercises/proverb/example.py
trackler-2.2.1.136 tracks/python/exercises/proverb/example.py
trackler-2.2.1.135 tracks/python/exercises/proverb/example.py
trackler-2.2.1.134 tracks/python/exercises/proverb/example.py
trackler-2.2.1.133 tracks/python/exercises/proverb/example.py
trackler-2.2.1.132 tracks/python/exercises/proverb/example.py
trackler-2.2.1.131 tracks/python/exercises/proverb/example.py
trackler-2.2.1.130 tracks/python/exercises/proverb/example.py
trackler-2.2.1.129 tracks/python/exercises/proverb/example.py
trackler-2.2.1.128 tracks/python/exercises/proverb/example.py
trackler-2.2.1.127 tracks/python/exercises/proverb/example.py
trackler-2.2.1.126 tracks/python/exercises/proverb/example.py
trackler-2.2.1.125 tracks/python/exercises/proverb/example.py
trackler-2.2.1.124 tracks/python/exercises/proverb/example.py
trackler-2.2.1.123 tracks/python/exercises/proverb/example.py
trackler-2.2.1.122 tracks/python/exercises/proverb/example.py
trackler-2.2.1.121 tracks/python/exercises/proverb/example.py
trackler-2.2.1.120 tracks/python/exercises/proverb/example.py