The default language for getting a computer to do a boring job for you.
Not every backend project is a website. Renaming a thousand files, pulling numbers from an API into a spreadsheet every morning, checking a page for changes, tidying a database - that's automation, and Python is the language most people reach for.
You'll see this result when you choose scripts or automation as what you're building and you're not on shared hosting. (On shared hosting the answer is PHP, run from cron - see the PHP pick.)
Python's standard library covers most automation without installing anything: pathlib and shutil for files and folders, csv and json for data, datetime for dates, subprocess for running other programs, urllib for basic web requests. When you need more, mature packages are a pip install away: requests or httpx for APIs, openpyxl and pandas for spreadsheets, Beautiful Soup for HTML, Playwright for driving a real browser.
The syntax matters too. Automation scripts are often written once and read again months later when something breaks; Python's readability makes that second visit much less painful. And no web framework is needed - a script is just a .py file.
from pathlib import Path
import shutil
downloads = Path.home() / "Downloads"
for item in downloads.iterdir():
if item.is_file():
folder = downloads / (item.suffix.lstrip(".").lower() or "other")
folder.mkdir(exist_ok=True)
shutil.move(str(item), str(folder / item.name))
print(f"Moved {item.name} -> {folder.name}/")
That's a complete, useful program. Improve it step by step: add a --dry-run flag with argparse that only prints what it would do, handle files that already exist in the destination, and sort by month using each file's modification date.
openpyxl.schedule trigger can run a Python script in the cloud on a cron schedule - handy for small jobs that write results back to a repository.python -m venv .venv) and record dependencies in requirements.txt.robots.txt, prefer an official API, and don't hammer servers.The moment you want a form to trigger your script, or a page to show its results, you're building a web app - and Flask lets you wrap the Python you've already written in a few routes. See the Python (Flask) pick.