---
product_id: 103137676
title: "Cracking Codes with Python: An Introduction to Building and Breaking Ciphers"
price: "MX$54"
currency: MXN
in_stock: false
reviews_count: 13
url: https://www.desertcart.mx/products/103137676-cracking-codes-with-python-an-introduction-to-building-and-breaking
store_origin: MX
region: Mexico
---

# Cracking Codes with Python: An Introduction to Building and Breaking Ciphers

**Price:** MX$54
**Availability:** ❌ Out of Stock

## Quick Answers

- **What is this?** Cracking Codes with Python: An Introduction to Building and Breaking Ciphers
- **How much does it cost?** MX$54 with free shipping
- **Is it available?** Currently out of stock
- **Where can I buy it?** [www.desertcart.mx](https://www.desertcart.mx/products/103137676-cracking-codes-with-python-an-introduction-to-building-and-breaking)

## Best For

- Customers looking for quality international products

## Why This Product

- Free international shipping included
- Worldwide delivery with tracking
- 15-day hassle-free returns

## Description

Learn how to program in Python while making and breaking ciphers—algorithms used to create and send secret messages! After a crash course in Python programming basics, you’ll learn to make, test, and hack programs that encrypt text with classical ciphers like the transposition cipher and Vigenère cipher. You’ll begin with simple programs for the reverse and Caesar ciphers and then work your way up to public key cryptography, the type of encryption used to secure today’s online transactions, including digital signatures, email, and Bitcoin. Each program includes the full code and a line-by-line explanation of how things work. By the end of the book, you’ll have learned how to code in Python and you’ll have the clever programs to prove it! You’ll also learn how to: - Combine loops, variables, and flow control statements into real working programs - Use dictionary files to instantly detect whether decrypted messages are valid English or gibberish - Create test programs to make sure that your code encrypts and decrypts correctly - Code (and hack!) a working example of the affine cipher, which uses modular arithmetic to encrypt a message - Break ciphers with techniques such as brute-force and frequency analysis There’s no better way to learn to code than to play with real programs. Cracking Codes with Python makes the learning fun!

Review: An excellent book of Python exercises and basic cryptography primer! - Full Disclosure: I solicited Mr. Sweigart for an eBook copy of this book for review purposes. This was AFTER purchasing the original Hacking Secret Ciphers book for Python 2 around 3 years ago and AFTER purchasing a physical copy of Cracking Codes immediately upon release based solely on my love for the previous installment. If it makes you feel any better, he got me the eBook months ago, and I'm dreadfully late on my review. I'm a huge fan of Mr. Sweigart's work. I found Hacking Secret Ciphers to be a brilliant primer on basic Python programming practices, and find that it has only been refined and updated in Cracking Codes. Many friends have expressed an interest in what I do and asked me where to begin to learn programming concepts, and I frequently point them toward Python and Mr. Sweigart's resources. Cracking Codes walks you through several different methods of encoding messages with different ciphers using the Python programming language. From a simple Caesar cipher all the way through an implementation of the textbook RSA cipher. He walks you through from basic data types and decision structures through loops, data structures, common Python modules, and other advanced concepts. You read from and write to files, and learn to powerfully process and transform text with Python. I frequently use Hacking Secret Ciphers/Cracking Codes and Automate The Boring Stuff as references for writing basic Python programs. They're outstanding resources, and it's a joy to go back through Cracking Codes, retype all the exercises, and troubleshoot them until they run. The diff tool on Mr. Sweigart's InventWithPython site is a godsend, and the ability to run the source code to see what my code should look like when it executes has helped me pass many a roadblock. I don't quite understand how every cipher works or why it's difficult to hack, but I do generally get what each program is doing at any given point, and you can, too. If you don't quite get cryptography, this is also a neat way to look under the hood and get some of the basic concepts. It's pretty wild to see a computer hack a cipher in seconds that would take a human hours, days, or months -- if they could solve it at all. An excellent and entertaining book of exercises. I wholeheartedly suggest it, especially for teens and adults interested in computer science and programming. Thank you for another great book, Mr. Sweigart!
Review: Learn about computers, programming, and secret codes - all in one book! - Cracking Codes with Python is a fantastic introduction to the Python programming language -- and coding in general -- using the super-fun theme of codebreaking. What's especially fun about this approach is that you can use these secret codes to send messages to your friends -- it's way better than invisible ink. As a student of computer history, I really appreciated the historical context provided for why codebreaking and ciphers are so important to the history of computers and technology. It's also great that the book provides a companion website with answers to all the practice problems at the end of each chapter, so that you can easily check your work. I've recommended this book to folks who want to learn to code, and I'll keep doing so! By the end of it, you'll become quite the code-breaker and also a great Python programmer! I hope you enjoy it!

## Features

- Highlight, take notes, and search in the book

## Technical Specifications

| Specification | Value |
|---------------|-------|
| Best Sellers Rank | #1,088,782 in Kindle Store ( See Top 100 in Kindle Store ) #25 in Web Encryption #153 in Open Source Programming #162 in Encryption |

## Images

![Cracking Codes with Python: An Introduction to Building and Breaking Ciphers - Image 1](https://m.media-amazon.com/images/I/81GNaPtFlDL.jpg)

## Customer Reviews

### ⭐⭐⭐⭐⭐ An excellent book of Python exercises and basic cryptography primer!
*by C***S on September 25, 2018*

Full Disclosure: I solicited Mr. Sweigart for an eBook copy of this book for review purposes. This was AFTER purchasing the original Hacking Secret Ciphers book for Python 2 around 3 years ago and AFTER purchasing a physical copy of Cracking Codes immediately upon release based solely on my love for the previous installment. If it makes you feel any better, he got me the eBook months ago, and I'm dreadfully late on my review. I'm a huge fan of Mr. Sweigart's work. I found Hacking Secret Ciphers to be a brilliant primer on basic Python programming practices, and find that it has only been refined and updated in Cracking Codes. Many friends have expressed an interest in what I do and asked me where to begin to learn programming concepts, and I frequently point them toward Python and Mr. Sweigart's resources. Cracking Codes walks you through several different methods of encoding messages with different ciphers using the Python programming language. From a simple Caesar cipher all the way through an implementation of the textbook RSA cipher. He walks you through from basic data types and decision structures through loops, data structures, common Python modules, and other advanced concepts. You read from and write to files, and learn to powerfully process and transform text with Python. I frequently use Hacking Secret Ciphers/Cracking Codes and Automate The Boring Stuff as references for writing basic Python programs. They're outstanding resources, and it's a joy to go back through Cracking Codes, retype all the exercises, and troubleshoot them until they run. The diff tool on Mr. Sweigart's InventWithPython site is a godsend, and the ability to run the source code to see what my code should look like when it executes has helped me pass many a roadblock. I don't quite understand how every cipher works or why it's difficult to hack, but I do generally get what each program is doing at any given point, and you can, too. If you don't quite get cryptography, this is also a neat way to look under the hood and get some of the basic concepts. It's pretty wild to see a computer hack a cipher in seconds that would take a human hours, days, or months -- if they could solve it at all. An excellent and entertaining book of exercises. I wholeheartedly suggest it, especially for teens and adults interested in computer science and programming. Thank you for another great book, Mr. Sweigart!

### ⭐⭐⭐⭐⭐ Learn about computers, programming, and secret codes - all in one book!
*by C***N on May 19, 2021*

Cracking Codes with Python is a fantastic introduction to the Python programming language -- and coding in general -- using the super-fun theme of codebreaking. What's especially fun about this approach is that you can use these secret codes to send messages to your friends -- it's way better than invisible ink. As a student of computer history, I really appreciated the historical context provided for why codebreaking and ciphers are so important to the history of computers and technology. It's also great that the book provides a companion website with answers to all the practice problems at the end of each chapter, so that you can easily check your work. I've recommended this book to folks who want to learn to code, and I'll keep doing so! By the end of it, you'll become quite the code-breaker and also a great Python programmer! I hope you enjoy it!

### ⭐⭐⭐⭐⭐ More about learning Python than it is about Cracking Codes
*by S***R on March 15, 2018*

As a Python tutorial, it is superb - comprehensive, well organized and painless. Follow along with the exercises and you'll end up with a good working knowledge of the language. Each succeeding chapter introduces more and more complex and useful language constructs, each of which is identified in the accompanying text and clearly explained. Indeed, it is the use of constructs like lists and dictionaries that make Python the very valuable and powerful scripting tool that it is. As a Code Cracking tutorial, it is, as declared in the book sub-title, an "Introduction". You'll see how various algorithmic strategies can be used against comparatively simple ciphers. The techniques include frequency analysis, word pattern matching and dictionary tests for decrypted text. But the book is more about Learning Python than it is about Cracking Codes. Upon completing it you'll emerge a journeyman Python programmer and a novice cryptographer.

---

## Why Shop on Desertcart?

- 🛒 **Trusted by 1.3+ Million Shoppers** — Serving international shoppers since 2016
- 🌍 **Shop Globally** — Access 737+ million products across 21 categories
- 💰 **No Hidden Fees** — All customs, duties, and taxes included in the price
- 🔄 **15-Day Free Returns** — Hassle-free returns (30 days for PRO members)
- 🔒 **Secure Payments** — Trusted payment options with buyer protection
- ⭐ **TrustPilot Rated 4.5/5** — Based on 8,000+ happy customer reviews

**Shop now:** [https://www.desertcart.mx/products/103137676-cracking-codes-with-python-an-introduction-to-building-and-breaking](https://www.desertcart.mx/products/103137676-cracking-codes-with-python-an-introduction-to-building-and-breaking)

---

*Product available on Desertcart Mexico*
*Store origin: MX*
*Last updated: 2026-07-07*