Python Tutorial
The language we start most beginners on. Variables through to reading files, with the mistakes we watch people make in class.
What this covers
Python is the language we put in front of most people who have never written code, and the reason is simple: you can do something useful in it on the first afternoon. There are no semicolons to forget, no type declarations to argue with, and the error messages are close to English.
These lessons cover what a first term of Python actually needs — variables, loops, lists, functions, dictionaries and files. They are short on purpose. Each one answers a single question, shows the code, and names the mistake that sends students to the mentor's desk, because that is the part you will not find in the documentation.
Work through them in order if you are starting out. If you arrived from a search for one thing, read that one and ignore the rest — nothing here depends on you having read the page before it.
After these lessons you can
- Read and write Python that uses variables, loops, functions and dictionaries without copying from a tutorial
- Understand why two names can point at the same list, and when that will bite you
- Open, read and write files safely, including CSV
- Recognise the handful of beginner mistakes that cause most of the errors you will hit
- Know when a list comprehension is clearer than a loop, and when it is not
All 6 Python lessons
In order, but each one stands alone. Start where your problem is.
Variables in Python
4 minHow names attach to values, why Python needs no type declaration, and the one thing that surprises everybody about assignment.2Loops in Python
5 minfor and while, range(), break and continue — and when a loop is the wrong tool entirely.3Lists in Python
5 minMaking, indexing and slicing lists, the methods worth memorising, and the mutable-default trap.4Functions in Python
5 mindef, arguments, return values, default and keyword arguments, and what scope actually means.5Dictionaries in Python
5 minKey-value storage, safe lookups with get(), looping over items, and why dictionaries beat parallel lists.6File Handling in Python
5 minReading and writing files with open(), why with is not optional, and the mode letters that decide whether you keep your data.Where Python is actually used
Including the part most course pages leave out: what it is the wrong tool for.
Backend and APIs
Django and FastAPI are both Python. Most of the web work we do for clients that is not WordPress is Python on the server.
Data and machine learning
pandas, scikit-learn and every serious ML library are Python first. If you are heading towards data, this is the entry point and not a detour.
Automation
The unglamorous one that pays quickest: renaming five hundred files, pulling a report every Monday, scraping a price list. Office workers get more out of this than developers do.
Not for
Phone apps and anything that has to run in a browser. Python is the wrong tool for both; JavaScript or React Native is the right one.
Before you start
Should I learn Python or C++ first?
Python, unless your college examines C++ this semester — in which case do both, starting with Python for a month. Python teaches you to think about the problem. C++ teaches you what the machine is doing. In that order, the second one is far less painful.
How long does it take to learn Python?
You can write useful scripts in three or four weeks of regular practice. Being employable with it takes months, because the language is the small part — databases, deployment and reading someone else's code are the rest. Anyone selling you 'Python in 7 days' is selling the syntax and calling it the skill.
Do I need maths for Python?
No, not for the language and not for web or automation work. You need it for machine learning, where the maths is the actual subject and Python is just how you type it.
Is Python enough to get work?
On its own, rarely. Python plus one framework and the ability to deploy what you built is a different conversation. That gap — from a script that runs on your laptop to something live on a server — is most of what our course spends its time on.
Learn Python with someone in the room
These pages explain the idea. The hard part is the hour where your own code will not run and you cannot see why — and that is the part a class is for. WebPrims is on Majitha Road, Amritsar. Come and sit one before you pay anything.