16 The scrambler: Randomly reordering the middles of words
Yuor brian is an azinamg cmiobiaontn of hdarware and sftraowe. Yoru’e rdineag tihs rhgit now eevn thgouh the wrdos are a mses, but yuor biran can mkae snese of it bceause the frsit and lsat ltrtees of ecah wrod hvae saeytd the smae. Yuor biran de’onst atlaulcy raed ecah lteetr of ecah wrod but rades wlohe wdors. The scamrbeld wrdos difteienly solw you dwon, but y’roue not rlleay eevn tyinrg to ulsrmbance the lrttees, are you? It jsut hnaepps! |
In this chapter, you will write a program called scrambler.py that will scramble each word of the text given as an argument. The scrambling ...
Get Tiny Python Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.