X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=slides%2Fcaesar-encipher.html;fp=slides%2Fcaesar-encipher.html;h=279c2bdf8aa96de2b978f9e012381fcb57705a71;hb=20aff345391c6ae2d00a55c586fda31f6f4315d5;hp=4afd78dad4f3367c5107a99d0f40ff8f1e0aa037;hpb=3d76ab459f6ecbd96e5dae3939830b3a67431cb7;p=cipher-training.git diff --git a/slides/caesar-encipher.html b/slides/caesar-encipher.html index 4afd78d..279c2bd 100644 --- a/slides/caesar-encipher.html +++ b/slides/caesar-encipher.html @@ -90,7 +90,7 @@ Before doing anything, create a new branch in Git Experiment in IPython (ephemeral, for us) -Once you've got something working, copy the code into a `.py` file (permanent and reusable) +Once you've got something working, export the code into a `.py` file (permanent and reusable) ```python from imp import reload @@ -224,6 +224,15 @@ ciphertext = [caesar_encipher_letter(p, key) for p in plaintext] ''.join() ``` +You'll be doing this a lot, so define a couple of utility functions: + +```python +cat = ''.join +wcat = ' '.join +``` + +`cat` after the Unix command (_concatenate_ files), `wcat` for _word concatenate_. +