Learn Python the easy way for AI, ML and GenAI
Short lessons, tiny examples, and a live editor in the browser. First learn the idea, then see the same idea in AI / ML code.
Learn without hassle. Everything you need to finish the course is available on this website.
Easiest next step
Start lesson 1
No signup. First lesson takes about 12 minutes.
- 47
- Lessons
- 140+
- Code examples
- 15h
- Reading time
- ₹0
- Cost
What is inside
- +Short basics: clear text + tiny code
- +Then AI / ML examples for the same idea
- +Live Try it editor on every lesson
- +NumPy, pandas, and charts in the browser
- +Daily challenge + downloadable certificate
- +Beginner to advanced in one clear path
Today's 5-minute challenge
One small practice for everyone today: Tiny counter class. No signup. Your mark-done status stays on this device.
Today · 5 min practice
Tiny counter class
Make a Counter with add(n=1) and value. Add twice, then print value.
Hint: Store self.value in __init__.
python console
Daily challenge · Classes and objects
~/lesson.py
Ctrl+Enter
console output
ready
$ waiting for Run...Download your certificate with your name
Complete Module 1 for a Foundations certificate, or finish the full course for the complete certificate. Enter your name and download a PNG signed by Rajinikanth Vadla - ready for LinkedIn or your resume.
- + Your name printed on the certificate
- + Instructor signature and photo
- + Unique certificate ID
- + Works on GitHub Pages (saved in your browser)
How students unlock it
- 1. Learn a lesson and run the tiny examples
- 2. Press Mark lesson done (or Next lesson)
- 3. Finish Module 1 or the full course
- 4. Enter your name and download the PNG
Jump in by topic
Short landing pages for common searches. Each one opens the matching lesson with the live compiler.
Python if / else for AI and ML
If a model score is high enough, keep it. Otherwise drop it.
Python lists for machine learning
Store prediction scores in a list and keep only the confident ones.
Python dictionaries for GenAI APIs
Build a small request dict with model and messages.
Python functions for AI engineers
Write a small function that builds a greeting or prompt string.
Python strings for prompts and text
Clean a messy prompt string, then print a formatted metric line.
Python loops for training and eval
Loop over validation losses and stop when they stop improving.
Python errors and exceptions
Convert a string to int safely and fall back to 0 on failure.
Python classes and objects
Build a tiny Counter class with add() and a value.
5 modules, 47 lessons, in order
Follow it top to bottom if you are new. If you already write Python, jump into Module 3 or 4.
Module 1 · Python foundations
Zero to comfortable: syntax, values, text, collections, and control flow.
- 01Python IntroLearn why Python is used for AI, how this course is organised, and run your first program.12 min
- 02Python SyntaxLearn indentation, comments, and how Python reads your code.14 min
- 03Python VariablesCreate variables, check types, and use operators. These are the building blocks of every script.18 min
- 04Python CastingConvert between strings, numbers, and booleans with int(), float(), and str().16 min
- 05Python NumbersLearn Python number types: int, float, and complex. Then see how they show up in AI / ML.16 min
- 06Python BooleansLearn True and False, comparisons, and how empty values behave.14 min
- 07Python StringsCreate strings, use f-strings, slice text, and clean whitespace.20 min
- 08Python String MethodsClean text, split and join strings, and format numbers with f-strings.20 min
- 09Python ListsStore ordered items in lists, fixed records in tuples, and unique values in sets.20 min
- 10Python DictionariesStore data as key-value pairs. Dicts map to JSON, configs, and API payloads.18 min
- 11Python If ElseMake decisions with if, and repeat work with for and while.20 min
Module 2 · Core language
Functions, files, OOP, modules, packages, pip, errors, regex, and project structure.
- 01Python FunctionsCreate reusable blocks of code with def, arguments, defaults, and return values.22 min
- 02Python LambdaWrite short anonymous functions and use them with sorted, map, and filter.16 min
- 03Python ComprehensionsBuild lists and dicts in one line, and stream values with generators.20 min
- 04Python IteratorsHow for-loops work, why iterators are single-use, and how zip and enumerate pair values.18 min
- 05Python ScopeWhere names live, how mutable arguments behave, and how closures capture variables.18 min
- 06Python Try ExceptHandle errors with try and except. Catch specific problems and fail clearly on the rest.20 min
- 07Python File HandlingRead and write files with with open, work with JSON, and build paths safely.20 min
- 08Python ClassesBundle data and behaviour with classes, methods, and inheritance.22 min
- 09Python InheritanceSubclassing, duck typing, abstract base classes, and special methods.22 min
- 10Python DecoratorsWrap functions with decorators and manage setup and teardown with context managers.20 min
- 11Python RegExSearch, findall, groups, and substitution with the re module.22 min
- 12Python DatesCreate datetimes, add durations, format and parse timestamps, and prefer UTC.18 min
- 13Python Standard Librarycollections, itertools, functools, hashlib, uuid, os, and sys for everyday tasks.22 min
- 14Python ModulesImport code from modules, guard entry points, and pin dependencies.18 min
- 15Python Packages and pipLearn what packages are, how pip installs them, and how requirements files keep projects repeatable.14 min
Module 3 · Python for data and ML
NumPy, pandas, statistics, plotting, scikit-learn, databases, and testing.
- 01Type hints and dataclassesAdd type hints and dataclasses so editors catch shape mistakes early.20 min
- 02NumPy arrays and vectorsCreate arrays, check shape and dtype, then compute cosine similarity.24 min
- 03pandas for datasetsBuild, filter, group, and clean tables with pandas before you train.24 min
- 04Statistics for machine learningMean, median, std, and percentiles - the numbers you report before you train.20 min
- 05Distributions and plottingSample common distributions and chart them with Matplotlib.22 min
- 06scikit-learn: regressionFit, predict, split, and score regression models with scikit-learn.24 min
- 07scikit-learn: classificationTrain classifiers, read a confusion matrix, and tune the decision threshold.26 min
- 08Pipelines, scaling, and clusteringScale and encode inside a Pipeline, cross-validate, then cluster with K-means.24 min
- 09Databases and SQL from PythonQuery SQLite from Python, use parameters safely, and load results into pandas.20 min
- 10Testing ML code with pytestAssert contracts and invariants. Mock the LLM. Gate quality with a floor.20 min
- 11Logging, configuration, and secretsUse structured logs, read config from the environment, and keep secrets out of code.18 min
Module 4 · GenAI and production
Async, LLM APIs, tensors, RAG, FastAPI serving, and shipping habits.
- 01Async Python and concurrencyRun many slow I/O calls at once with async/await, and know when threads or processes fit better.22 min
- 02Calling LLM APIs in PythonHTTP JSON payloads, structured output, and simple token cost habits for GenAI calls.24 min
- 03From NumPy to PyTorch tensorsTensors, gradients, and the training loop pattern behind fine-tuning code.20 min
- 04Build a RAG pipeline in pure PythonChunk, embed, retrieve, and assemble a grounded prompt - the retrieval pipeline without frameworks.26 min
- 05Serving models with FastAPITurn a model or RAG pipeline into a validated HTTP service with health checks.22 min
- 06Production Python for AI teamsTooling, reproducibility, and habits that separate a demo from a dependable system.20 min
Module 5 · Quick reference
Built-ins, string and collection methods, keywords, operators, and exceptions.
- 01Built-in functions referenceBuilt-in functions worth knowing, grouped by job, with tiny runnable demos.18 min
- 02String methods referenceString methods for cleaning, searching, splitting, and formatting.16 min
- 03List, dict, set, and tuple referenceCore collection methods, when to use each type, and a speed note on membership.18 min
- 04Keywords, operators, and exceptions referenceReserved keywords, operators worth knowing, and which exceptions to catch.18 min
Who this is for
The same path works whether you are starting from nothing or filling gaps before an AI role.
Complete beginners
You have never written code. Module 1 assumes nothing and explains every term the first time it appears.
Career switchers
You come from support, testing, data entry, or another engineering field and need Python that stands up in an interview.
DevOps and cloud engineers
You know infrastructure and want the Python that MLOps and LLMOps roles actually ask for.
AI and GenAI engineers
You can already code but want the production side: async batching, structured output, RAG internals, and serving.
How the compiler works
The compiler is CPython compiled to WebAssembly, running inside your browser tab. Your code never leaves your machine, there is no account, and there is no server to rate-limit you.
Works offline after load
The runtime downloads once, then stays cached in the browser.
Standard library included
json, pathlib, dataclasses, asyncio, logging, itertools and more.
NumPy and pandas
Loaded on demand in the lessons that need them.
Limits worth knowing: no input(), no network calls, no GPU, and runs stop after 20 seconds. Lessons that need PyTorch, FastAPI, or an LLM SDK give you a complete file to run on your own machine.
Frequently asked questions
Can I get a certificate?+
Yes. After you mark Module 1 lessons done, unlock the Foundations certificate. Finish all lessons for the full-course certificate. Enter your name and download a PNG with the instructor signature. Progress is stored in your browser on this device.
Is this Python course really free?+
Yes. Every lesson, code example, daily challenge, certificate download, and the in-browser compiler are free to use with no signup. Paid live cohorts on MLOps, AIOps, and AI automation are separate programs.
Do I need to install Python to follow along?+
No. Every lesson can be completed on this website with the browser compiler. The course also explains how production projects use packages and environments, but no setup is required to learn here.
Is this suitable for complete beginners?+
Yes. Module 1 starts from what a variable is. If you already write Python, skip to Module 3 for NumPy, pandas, statistics, and scikit-learn, or Module 4 for async, LLM APIs, RAG, and FastAPI. Module 5 is a reference you can come back to.
Which libraries can I run in the browser compiler?+
The browser supports the Python standard library, SQLite, NumPy, pandas, scikit-learn, and Matplotlib. Advanced PyTorch, FastAPI, and LLM lessons use clear browser-safe simulations, so you can complete their learning goals without leaving the site.
How long does the course take?+
About 15 hours of reading and running examples across 47 lessons. Most people spread it over two to four weeks alongside a job.
What should I learn after this course?+
Docker and Git, then a cloud platform, then the MLOps and LLMOps stack: MLflow, Kubernetes, vector databases, LangChain, and evaluation. The roadmaps on this site lay out the order.
Where to go after Python
Python is stage one. These free guides lay out the rest of the path into AI engineering roles.
Want the same depth on MLOps, LLMOps and AI agents?
This Python course is free forever. The live cohorts take you from Python into production ML and GenAI systems with mentorship and job support.
I read every message. Typical reply within a day. No pressure to buy.
