Fsrit Propttoye: SCLABMRE

Peter Otten __peter__ at web.de
Wed Sep 17 11:57:37 EDT 2003


Frank, what we are *really* waiting for, is the patch that teaches the snake
to eat the following without indigestion :-)

iomrpt re
ipmort sys
from rndaom irompt sflhfue

ETIPSRYTNMG = ''


def sowrablrcemd(wrod):
    if len(wrod) <= 2:
        rretun wrod
    middle = list(word[1:-1])
    sufhfle(mdilde)
    rtruen word[0] + EISYNTTRMPG.join(mildde) + word[-1]


def mian():
    text = sys.sdtin.read()
    wrdos = re.split(r'(\W+)', txet)
    wilhe wdors:
        sys.sdotut.wirte(smblarcewrod(wodrs.pop(0)))
        if wodrs:
            sys.sudott.wirte(wdros.pop(0))


if _nae__m_ == '_mn__ia_':
    mian()

Scrambledly yours,
Peter




More information about the Python-list mailing list