itertoolsmodule already exists. Includes working code examples.
My new book, The Big Book of Small Python Projects, is now available from No Starch Press. It's free to read online under a Creative Commons license. This book contains 81 small but complete programming projects written in Python. These projects are designed to help new programmers who have learned the basics see what real programs "look like". These aren't code snippets, but actual, full programs that you can run. At the same time, they are small enough so that their source code is easy to understand.
In March 2020, just before the lockdowns would begin, I gave the opening keynote at PyTennessee 2020. Unfortunately, it wasn't recorded. But I still have the script I used and so I re-recorded the talk. I've posted it to my YouTube channel.
Extracting text as string values from images is called optical character recognition (OCR) or simply text recognition. This blog post tells you how to run the Tesseract OCR engine from Python. Includes working code examples.
This tutorial teaches you about Pip, a package manager that installs third-party packages for Python.
How to install the ComputerCraft mod, which adds Lua-programmable robots to Minecraft.
watch "git status"in one and
watch "git log -oneline"in the other so you can get live feedback as you enter Git commands.
Information about how to sign up for my Python course on Udemy for free or at a discounted rate.
A quick guide to using type hints in Python.
5 Stars: An excellent project-based book for young readers who want to move beyond Scratch
Code This Game is an excellent book that teaches Python programming by guiding the reader through making a tower-defense game from scratch. This is a book that doesn't shy away from programming detail, but manages to remain fun and engaging. If you have a student or child who wants to move beyond MIT's Scratch programming tool and do "real" programming, this is a great book.
Here are all the new additions and updates in the second edition.
A recent post to Reddit sparked some comments, so I wanted to clarify: In Python, hashable objects must be immutable and mutable objects cannot be hashable. (With one exception.)
Alternative Title: The Little Schemer Wears No Clothes
Perhaps a software engineer or MIT professor friend of yours recommended this book to you. “Oh, you want to learn how to code? You should read The Little Schemer,” they’ll say. Your friend means well, but is completely wrong to recommend this book.
Python's packaging ecosystem contains multitudes. It can be intimidating for new Python developers to try to crack into, especially given the rapid evolution of Python packaging. Writing a *helloworld.py* file and running it on your computer is simple, but getting it to run on someone else's computer (and doing this the "right" way) involves a tangle of terms, tools, and techniques. What are wheel files? What is distutils? Do I use distutils or easy_install or pip?
To get to the bottom of this myself, I've compiled a curriculum of PyCon talks, online documentation, and my own personal notes to finally get a complete handle on Python packaging.
Programming games are a games genre where instead of playing the game directly, players write bot programs to play the game autonomously. I've created a Zombie Dice simulator, allowing programmers to practice their skills while having fun making game-playing AIs. Zombie Dice bots can be simple or incredibly complex, and are great for a class exercise or an individual programming challenge.