Demo entry 4113210

doctest

   

Submitted by anonymous on Mar 21, 2016 at 15:11
Language: Python 3. Code size: 823 Bytes.

    >>> nederlands = Lettergrepen('patronen.nl.txt')
    
    >>> nederlands.patronen('lettergrepen')
    {'r1g', '1gr4', 'e1pe', 't5te', '1te', '4n.', 't2er', '4t3t', '.l4'}
    >>> nederlands.patronen('Babbelaar')
    {'.b4', '3b4e', 'a4a4', '3ba', '4bb', '4ar.', '1b', '4r.', 'e1la'}
    >>> nederlands.patronen('slaapmutsje')
    {'1mu', '2s3je.', '4ts', '4e.', '5slaap', '2p1m', 'a4a4', '5mut', 'sj2', '.s4', 's2l4', 'muts2', 'ts2j', 's1je'}
    >>> nederlands.patronen('TROUBADOUR')
    {'5dou', 'tr4', '3ba', '1do', '2u2b', '3trou', '1b', '4r.', '.t4'}
    
    >>> nederlands.splits('lettergrepen')
    'let-ter-gre-pen'
    >>> nederlands.splits('Babbelaar')
    'Bab-be-laar'
    >>> nederlands.splits('slaapmutsje')
    'slaap-muts-je'
    >>> nederlands.splits('TROUBADOUR')
    'TROU-BA-DOUR'

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).