Why Python
The language that reads like English, runs like a machine, and eliminates hours of manual CA work in seconds.
You just saw what the command prompt can do. Now we are going to talk about a tool that is 100 times more powerful, and yet somehow easier to read than the commands you just typed.
First, a Table That Will Make You Angry
Before we explain anything, look at this. Then calculate the hours your team spends on the left column every month.
| Task | How long you do it manually | How long Python takes |
|---|---|---|
Rename 500 PDFs to ClientName_Date.pdf format | 3 hours | 4 seconds |
| Combine 50 monthly Excel reports into one master sheet | 2 hours | 10 seconds |
| Extract invoice totals and dates from 200 PDF invoices | 1 full day | 2 minutes |
| Send 100 personalized client emails from a spreadsheet | 2 hours | 30 seconds |
| Check if every GST number in a list is valid format | 1 hour | 5 seconds |
| Find duplicate entries across 3 different Excel files | 45 minutes | 8 seconds |
| Download all bank statements for the year from a portal | 30 minutes manually | Automated, runs daily |
| Generate 50 formatted client reports from a data sheet | Half a day | 3 minutes |
How much of that table describes your actual work? Or the work your team does?
How many hours per month are being spent on things in the left column?
Now calculate that in CA firm billing rates.
That is what Python eliminates.
What Is Python?
Python is a programming language. But it is unlike most programming languages in one crucial way: it reads like English.
Compare these two programs that do the same thing — they both print "Hello" five times. Java requires many lines of ceremony. Python requires one readable line.
Same output. Python is simply: say what you want to happen. That's it.
This readability is not an accident. Python was designed from the beginning to prioritize human comprehension. The creator's goal was a language where code looks as close to plain English instructions as possible.
For CAs and finance professionals — who think in process terms, in SOPs, in step-by-step workflows — Python maps almost directly onto how you already think.
Why Python Specifically (Not Any Other Language)
There are hundreds of programming languages. Here is why Python is the right one for you:
It is the most readable language in existence. When Claude Code writes Python for you, you can read it like a business process document. You don't need to understand every word — but you can follow what it's doing.
It is free, and always will be. No license fees. No per-seat costs. No enterprise edition. Runs on any computer. This is very different from Tally, which charges you for every installation.
It is used everywhere that matters:
- Google uses Python for data analysis and automation
- NASA uses Python for spacecraft calculations
- SEBI uses Python for market surveillance
- Every major Indian bank's data teams use Python
- The Reserve Bank of India publishes Python tools for financial data
- The GSTN (GST Network) systems are largely Python on the backend
It has a library for every CA problem you will ever have:
- Excel files:
openpyxl,pandas - PDF files:
pypdf,pdfplumber - Email:
smtplib, built into Python - GST data: public GSTN APIs +
requests - Bank statements:
pdfplumberfor PDF statements - Data analysis:
pandas(the most powerful data tool after Excel)
Claude Code writes it for you. This is the most important point. You do not need to write Python yourself. You describe what you want, Claude writes the Python, you run it. You are the business brain. Claude is the technical hands.
The "Read, Don't Write" Philosophy
This is the single most important concept in this module. Read it carefully.
You do not need to write Python. You need to read Python well enough to:
- Understand what Claude wrote, at a high level
- Verify it is doing what you asked
- Spot if something looks wrong ("it's deleting files instead of copying them")
- Know what to ask Claude to change
This is exactly how you work with Excel formulas from a template someone gave you. You didn't write the VLOOKUP from scratch. But you can read it and know: "this is looking up the client name from column A in the master sheet." You can verify it's right. You can tell someone when it's wrong.
Python is the same. Claude writes it. You read and verify.
The only Python you need to "write" yourself: The prompt you give to Claude Code.
"Write Python that reads all PDF files in this folder, extracts the total amount from each using the text 'Total Amount: Rs.' as a marker, and saves the filename and amount into an Excel file called summary.xlsx"
That instruction. Written in plain English. That is your job.
Claude writes the code. You run it. You check the output.
Installing Python
Before you can run any Python, you need to install it. Do this once on your machine.
Download Python
Go to python.org/downloads and click the big yellow button: "Download Python 3.x.x" (whatever the latest version is). The download starts automatically.
Run the installer — critical step
Open the downloaded installer. On the first screen, look at the bottom — you will see a checkbox that says "Add Python to PATH".
Check this box before clicking Install. If you miss this, Python won't work from the command prompt and you will need to reinstall.
Click "Install Now".
Verify it worked
Close your current terminal and open a new one. Type python --version and press Enter.
You should see something like Python 3.12.3. If you see that, Python is installed and ready.
Check pip is installed
pip is Python's package manager — how you install libraries like pandas and openpyxl. Run pip --version in the terminal.
If you see a version number, you're good. If not, run python -m ensurepip --upgrade.
python and pip commands won't be recognized in any terminal windows that were already open before installation. Close all terminal windows and open new ones before verifying.python --version in a fresh terminal right now. It should print the version number. If it says Python is not recognized, you either missed the "Add Python to PATH" checkbox or forgot to open a fresh terminal. Re-run the installer if needed.How Claude Code Writes Python for You
Here is the complete workflow. You will use this in the next section and forever after.
Open Claude Code in VS Code
Open VS Code. Press Ctrl+Shift+P, type "Claude Code", press Enter. Or open a terminal and type claude.
Describe your task in plain English
Be specific. The more specific you are, the better the code will be.
Vague (produces mediocre code): "Write Python to rename my files"
Specific (produces good code): "Write Python that renames all PDF files in the folder C:\Users\Arjun\Downloads\Invoices. Each file should be renamed to include today's date at the front in YYYY-MM-DD format, followed by the original filename. For example, if the original file is called 'Invoice_HDFC.pdf', the new name should be '2026-05-09_Invoice_HDFC.pdf'. Don't modify the original files until I confirm the script looks right — first print the list of old name to new name pairs so I can review."
Claude writes the code
Claude will produce a Python script in the terminal. Read through it — you don't need to understand every line, but look for the folder path and the renaming logic.
Save the code to a file
Copy the code. Open Notepad. Paste it. Save as rename_invoices.py. The .py extension is what tells your computer it's a Python file.
When saving, change "Save as type" to "All Files" — otherwise Notepad adds .txt to the end.
Run it
In the command prompt, navigate to where you saved the file and run python rename_invoices.py. The script runs. You see the preview. You type yes. Files are renamed.
If something goes wrong
Copy the error message. Go back to Claude Code. Paste it and say: "I ran the script and got this error: [paste error]. Fix it."
Claude fixes it. You run it again.
hello.py and run it with python hello.py. You should see the message printed 5 times. This confirms your whole Python setup works end to end.Python Key Concepts — Just Enough to Read the Code
You do not need to memorize these. You need to recognize them when you see them in Claude's output.
| What you see in Python | What it means | Excel equivalent |
|---|---|---|
folder = "C:\Invoices" | Create a named container holding this value | A named cell (named range) |
files = ["a.pdf", "b.pdf", "c.pdf"] | A list of multiple items | A column of data |
for file in files: | Do something for each item in the list | Dragging a formula down 500 rows |
if file.endswith(".pdf"): | Only do this if the condition is true | IF() formula |
import pandas | Load a pre-built toolkit | Enabling an Excel add-in |
def rename_file(old, new): | Define a reusable set of instructions with a name | A named macro or named formula |
print("Done!") | Show a message | MsgBox "Done!" in VBA |
# This is a comment | A note for humans — the computer ignores it | Cell comment |
When you see Python code and recognize these patterns, you can read it like a process flow:
- Here we load the toolkit we need
- Here we define the folder we're working in
- Here we go through each file one by one
- Here we check if it's a PDF
- Here we rename it
- Here we confirm it's done
Business process. Step by step. With Python as the language.
The CA firm competitive advantage:
Right now, most CA firms do not use Python. They hire people to do repetitive work manually. The firms that figure this out first will do in seconds what competitors do in days — for the same cost.
You are learning this in 2026. Five years from now, every serious CA firm will have people who know this. You are early.
Next: Python for CAs — actual, runnable code for actual CA problems.
python and press Enter — you should see >>> appear (Python interactive mode)print("Hello from CA") and press Enter2 + 2 and press Enter — Python returns the result immediatelyname = "Ananya" then print("Hello, " + name) and press Enterexit() to leave Python interactive mode when doneHello from CA, then 4, then Hello, Ananya printed in sequence. You just ran 3 Python instructions interactively — no script file needed. This is the fastest way to test a single idea before asking Claude to build the full automation.- Python is installed and
python --versionworks in my terminal - I ran at least one Python instruction in interactive mode (the
>>>prompt) - I understand "Read, Don't Write" — Claude Code writes Python, I guide it and review the output
- I can explain what a function definition does vs. what calling a function does
- I can name at least 3 CA tasks from the time-savings table that Python could automate