Writing Useful Python Scripts
Learn to write real Python code to automate everyday tasks and crunch data. Start by manipulating text and numbers, branch into smart decision-making, and finish by building reusable scripts.
Like Duolingo, but for Writing Useful Python Scripts. Tomo turns the whole topic into a game you play five minutes a day, until it actually sticks.
A short one: 12 levels across 2 sections, about 24 minutes end to end, roughly 5 days at five minutes a day. It moves through Making Python Do Real Work and Automating Repetitive Tasks. It starts from scratch.
Free forever · No credit card · iPhone & Android

Key ideas in Writing Useful Python Scripts
- In Python, assigning a value to a variable name stores it for repeated use later in the script
- Changing the value stored in a variable automatically updates every calculation that references that variable name
- Writing raw numbers repeatedly forces you to hunt down and change every occurrence manually
- Python treats the + operator as arithmetic addition when applied to numbers
- Python treats the + operator as text concatenation when joining two strings together end-to-end
- Quoted digits are treated as text characters rather than numeric values
- Placing an 'f' immediately before the opening quote creates an f-string in Python
- Curly braces {} inside an f-string tell Python to evaluate and display the variable or calculation inside them
- Without the 'f' prefix, Python treats curly braces and the text inside them as literal text characters
- Python's input() function halts the script and waits for the user to press Enter
- Everything captured by input() is returned as a string, even if the user typed solely numeric digits
- Python raises a TypeError if you try to add a raw string from input() directly to an integer
- Converting text digits with int() turns the string into an actual number that Python can perform math on
- Adding '1' as text would simply tack the character '1' onto the end instead of doing arithmetic
- Comparison operators like > and == evaluate numbers and produce either True or False in Python
- == checks whether two values are equal, while != checks whether they are different
You've tried the other tabs
Thirty open tabs. Four facts you actually kept.
You watched. You nodded. By Sunday it was gone.
One answer, then back to scrolling.
Eight weeks. You meant to finish. You didn't.
Tomo gives Writing Useful Python Scripts the Duolingo treatment: levels, streaks, and quick quizzes that test what you just learned. That game loop is what the tabs above never had, so it's the one you actually finish.
Here's what playing it feels like
A real question from this course. Take your best guess.
What happens when you change the value stored in a variable that you used across several calculations?
Get it right to open this lesson and 11 more in the app.
Where Writing Useful Python Scripts takes you
- 1
Making Python Do Real Work
- Running Calculations and Interactive Prompts
- Guiding Actions with Conditional Logic
- 2
Automating Repetitive Tasks
- Wrangling Lists with Loops
- Packaging Reusable Functions and Handling Errors
2 sections · 4 units · 12 levels. Built to play, not to enroll.
Tomo is in ChatGPT
Tomo is also a ChatGPT plugin: the same playable courses, built and played inside your chat.
Add Tomo to ChatGPT- What to ask
- “Make me a Tomo course on black holes.” “Turn this chat into a Tomo course.”
- What you get
- Quick questions with instant feedback, hearts and stars, ready to play in about a minute.
- Where it goes
- No sign-up to start. Connect your Tomo account and your streak carries on in the app.
You pick the voice
Writing Useful Python Scripts is taught in the Bestie style: your friend who just gets it. Want a different feel? In the app you can spin up the same topic in any of Tomo's teaching styles. Same facts, totally different vibe.
More Technology on Tomo
Python: Writing Useful Scripts
Learn how to write real, functioning Python code to automate tedious tasks and crunch everyday numbers. Build confidence step-by-step from your first variable to clean, reusable custom functions.
Writing Your First Python Scripts
Build a working intuition for the world's most popular programming language. Learn how Python stores information, makes decisions, and automates repetitive tasks with clean, readable code.
Writing Code with Python
Turn plain text into working programs that calculate, automate, and solve real problems. Learn how to direct computer logic, work with collections of data, and build reusable scripts.
Python from Scratch
Learn to write real, working Python code to automate repetitive tasks, analyze information, and build your own applications. Master core syntax, data structures, and practical libraries through hands-on logic.
Python Programming for Beginners
Stop reading about code and start writing it. Build your first programs immediately and learn how to think like a developer to solve real-world problems.
JavaScript for the Web
Learn the programming language that powers interactivity on the web. Go from typing your first commands to building reactive interfaces and fetching live internet data.
Start Writing Useful Python Scripts today.
Download Tomo, search Writing Useful Python Scripts, and play your first lesson in under a minute.