liveBook · Manning

Rot13

As explained in Natural Language Processing in Action, Second Edition

A Caesar cipher is a substitution cipher that shifts each letter by a fixed position in an ordered alphabet.

ROT13 is a Caesar cipher that rotates each letter 13 positions through the alphabet. Applying the inverse rotation decodes the message. section 3.4.1

The Zen of Python

The encoded line “Gur Mra bs Clguba, ol Gvz Crgref” becomes “The Zen of Python, by Tim Peters” after ROT13 decoding.

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Demonstrates the cipher’s intuition, frequency-based shift discovery, character-level implementation, and library-based decoding.
Examples
Uses the encoded Zen of Python, character-count tables, frequency histograms, and Python decoding commands.
What you can do after
Apply it via Python’s codecs package to decode ROT13 messages.
How it connects
Connects Caesar cipher, character frequency, ord(), chr(), and Python codecs.

Also explained in

Compare how 3 books explain rot13 →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.