Free · 303 Topics · No Signup
Python Notes
History to OOPs & Exception Handling — written by Coding Now Tech Institute's mentors. Free to read, structured to actually help you learn.
Python notes by Coding Now Tech Institute cover 303 topics — from python home to update documents — each explained with short definitions, syntax and runnable code examples. They are 100% free, need no signup, and work as quick revision for college exams, Python interviews and Coding Now Tech Institute's mentor-led Python course in Pitampura, Delhi.
No notes found. Try a different search term, or browse all Python notes.
Python Tutorial
101 of 101 topics publishedPython HOME
Python is the most beginner-friendly language for data science, AI and automation, and it is where most Coding Now Tech Institute students start. This free track covers everything from syntax to machine learning.
Python Intro
Python powers websites, data pipelines and AI models, yet reads almost like English. Learn what Python is, where it is used, and why it is the best first language in 2026.
Python Get Started
Getting started with Python takes one install and a few lines of code. See how to set up your machine, check the version, and run your very first program.
Python Syntax
Python's clean syntax — no braces, no semicolons — is what makes it famous for readability. Learn indentation, comments and the basic rules every script follows.
Statements
Statements are the individual instructions Python executes, one line at a time. Understanding how they combine is the foundation for reading any Python program.
Python Output
Printing output with the print() function is the first step in seeing what your code actually does. It is also how you debug programs for years afterwards.
Print Numbers
Numbers print differently from strings, and print() handles both with ease. Learn the differences between displaying digits and text in your output.
Python Comments
Comments explain code to humans and are ignored by Python, making them essential documentation. Good commenting is a habit that pays off in every team project.
Python Variables
Variables store values under a name so you can reuse them throughout a program. They are the most fundamental concept in any programming language.
Variable Names
Variable names follow simple rules — start with a letter or underscore, no spaces or keywords. Choosing clear, descriptive names makes code readable for months to come.
Assign Multiple Values
Python lets you assign several variables in one line and unpack collections directly into names. It is a small trick that removes a lot of boilerplate.
Output Variables
Combining variables with text in print() output is a daily task in Python. Learn string concatenation and commas to format messages cleanly.
Global Variables
Global variables live outside functions and are visible everywhere, but they come with traps. Understanding scope here prevents a whole class of hard-to-find bugs.
Python Data Types
Every value in Python has a type — int, str, float, bool and more — and types decide what you can do with it. This map of built-in types is your foundation.
Python Numbers
Python numbers cover integers, floats and complex values, each with different precision and use. Learn the three numeric types and when each applies.
Python Casting
Casting converts values between types, like turning user input strings into numbers. It is the bridge between what data looks like and what you need it to be.
Python Strings
Strings are sequences of characters, and Python treats them as first-class data. Almost every real program handles text, so string basics matter everywhere.
Slicing Strings
Slicing pulls out parts of a string using index ranges, from single characters to every other letter. It is one of Python's most elegant and frequently used tricks.
Modify Strings
Strings are immutable, but a rich set of methods lets you transform them into new values. Learn upper, lower, strip, replace and friends.
Concatenate Strings
Concatenation joins strings together with the + operator, and f-strings do it even better. Building dynamic messages is a core everyday task.
Format Strings
String formatting inserts values into templates, and modern f-strings make it effortless. Formatting turns data into readable reports and messages.
Escape Characters
Escape characters let you include quotes, newlines and tabs inside strings. Without them, some of the simplest text becomes impossible to write.
String Methods
Python ships with dozens of built-in string methods for searching, splitting and transforming text. Knowing the most useful ones saves writing loops from scratch.
Python Booleans
Booleans represent true and false, the outcomes every decision in your program is built on. Learn how comparisons produce them and how they drive logic.
Python Operators
Operators perform calculations, comparisons and logical checks on values. This overview maps arithmetic, comparison, logical and bitwise operators in one place.
Arithmetic Operators
Arithmetic operators — add, subtract, multiply, divide and more — turn Python into a calculator. Learn each symbol and the order in which they execute.
Assignment Operators
Assignment operators store values and update them in one step, like += and *=. They make counter and accumulator code shorter and clearer.
Ternary Operator
Python's ternary lets you assign one of two values based on a condition in a single line. It is the compact way to express simple either-or logic.
Comparison Operators
Comparison operators check equality and ordering, producing the booleans that control if statements and loops. They are the grammar of decision-making.
Logical Operators
and, or and not combine boolean conditions into complex rules. Getting their precedence right is a classic interview topic and a daily practical need.
Identity Operators
is and is not test whether two names point to the exact same object, not just equal values. The distinction matters with lists, None and small integers.
Membership Operators
in and not in check whether a value exists inside a collection, like a name in a list. They are the most readable way to test membership in Python.
Bitwise Operators
Bitwise operators work on the individual bits of integers, and they underpin compression, hashing and low-level work. Rare in apps, essential in interviews.
Operator Precedence
Precedence decides which operation runs first when several appear together, like maths in school. Misreading it is a top source of silent logic bugs.
Python Lists
Lists store ordered, changeable collections of items, and they are Python's most-used data structure. Nearly every script you write will contain one.
Access List Items
Indexing and slicing let you reach any element or sublist by position. Mastering indexes, including negative ones, makes list work second nature.
Change List Items
Lists are mutable, so you can replace items by index or swap ranges in place. This flexibility is what separates lists from tuples.
Add List Items
append, insert and extend grow a list in different ways, each with its own behaviour. Choosing the right one keeps list-building code clean and correct.
Remove List Items
Removing items happens with remove, pop, del and clear, and each behaves differently. Knowing what each returns — or fails on — avoids bugs.
Loop Lists
Looping over a list processes every item in turn, the core pattern of data handling. for loops over lists appear in almost every Python program.
List Comprehension
List comprehensions build new lists from existing ones in a single readable line. They are a signature Python skill that interviewers love to see.
Sort Lists
Sorting arranges lists alphabetically or numerically, with reverse and custom key options. It powers leaderboards, rankings and organised output.
Copy Lists
Copying a list seems simple until you meet references sharing the same data. Learn shallow copies, deep copies and the list() and copy() methods.
Join Lists
Joining lists combines collections with +, extend or clever comprehensions. It is how datasets get merged before analysis.
List Methods
Python's list methods cover counting, indexing, reversing and more. A quick tour of the full toolbox keeps you from reinventing built-ins.
Python Tuples
Tuples are ordered, immutable collections — like lists that cannot change. They are used for fixed records, function returns and dictionary keys.
Access Tuples
Tuple items are reached by index and slice exactly like lists. The difference is that what you read can never be accidentally modified.
Update Tuples
Tuples cannot change directly, so updating means building a new tuple or converting through a list. Learn the safe patterns for working around immutability.
Unpack Tuples
Unpacking assigns tuple elements to named variables in one line, including with * for the rest. It makes function returns and data rows elegant to handle.
Loop Tuples
Iterating over tuples is identical to lists, with the added safety that nothing can change mid-loop. Use for loops to process fixed datasets.
Join Tuples
Joining tuples creates a new tuple from existing ones with + and *. It is straightforward once you accept that the original never changes.
Tuple Methods
Tuples keep a deliberately small API — mostly count and index. Their simplicity is the point, making data integrity the priority.
Python Sets
Sets hold unordered collections of unique items, perfect for membership tests and removing duplicates. They answer what-do-I-have questions instantly.
Access Set Items
Sets are unordered, so you cannot index them — but you can loop and test membership. Understanding this changes how you design lookups.
Add Set Items
add and update insert items into a set, silently ignoring duplicates. This guarantee of uniqueness is why sets excel at deduplication.
Remove Set Items
Set removal offers remove, discard and pop, each handling missing items differently. Choosing discard over remove prevents avoidable crashes.
Loop Sets
Looping over sets processes each unique item once, in arbitrary order. It is the natural way to act on deduplicated data.
Join Sets
Set operations like union and intersection combine collections using set theory. They solve overlap and difference questions in one line.
Frozenset
A frozenset is an immutable set that can be hashed and used as a dictionary key. It is the version you reach for when the set must never change.
Set Methods
Python's set methods implement union, intersection, difference and more. Knowing them turns messy list comparisons into clean set algebra.
Python Dictionaries
Dictionaries store key-value pairs, giving instant lookups by name — config, JSON, records. They are the most important structure after lists.
Access Items
Dictionary values are accessed by key, with get() providing safe defaults. Indexing mistakes here are the classic KeyError source.
Change Items
Dictionaries are mutable, so updating a value or merging updates is a one-liner. Learn assignment and the update method for bulk changes.
Add Items
Adding dictionary entries is just assigning a new key, and setdefault handles the first-time case. Building lookup tables is a core pattern.
Remove Items
pop, popitem and del remove dictionary entries with different return behaviours. Choosing correctly keeps key-handling code predictable.
Loop Dictionaries
Looping over dictionaries can visit keys, values or both using items(). It is how you process records and build reports from mappings.
Copy Dictionaries
Copying dictionaries shares the same reference pitfalls as lists, solved with copy() and dict(). Learn to duplicate mappings safely.
Nested Dictionaries
Nested dictionaries store dictionaries inside dictionaries, modelling rich structures like users with addresses. JSON data often arrives this way.
Dictionary Methods
The dictionary method toolbox — keys, values, items, update — covers most real-world needs. A quick tour prevents writing loops for built-ins.
Python If...Else
if and else choose between code paths based on conditions, the heart of every decision your program makes. This is where programs start behaving intelligently.
Python Elif
elif chains test multiple conditions in order until one passes, replacing nested ifs with readable steps. It is how multi-branch decisions stay tidy.
Python Else
The else clause catches the case where no condition matched, giving every decision a fallback. Used with if and loops, it completes the logic.
Shorthand If
Python's one-line if writes a conditional on a single line for simple cases. Compact, but readability should decide when to use it.
Logical Operators
Combining and, or and not inside if conditions builds rich rules from simple checks. Getting the grouping right is where logic bugs hide.
Nested If
Nested ifs place conditions inside conditions for dependent logic, like checking a login before a role. Keep nesting shallow to stay readable.
Pass Statement
pass is a placeholder that does nothing, letting you stub out functions and empty blocks. It keeps incomplete code valid while you build.
Python Match
match is Python's pattern-matching statement, a cleaner switch-case for comparing structures. It shines with tuples, lists and value patterns.
Python While Loops
while loops repeat as long as a condition holds true, powering retries, games and input validation. Beware the infinite loop — control the condition.
Python For Loops
for loops iterate over sequences a fixed number of times, and they are Python's workhorse. Combined with range, they cover almost every repetition need.
Python Functions
Functions package reusable logic under a name, taking inputs and returning outputs. They are the basic unit of organised, testable code.
Python Arguments
Arguments pass data into functions, by position or by keyword, with defaults available. Getting the argument rules right unlocks flexible APIs.
Python *args / **kwargs
*args and **kwargs let functions accept any number of extra arguments. They power decorators and wrappers in real Python libraries.
Python Scope
Scope decides where a variable is visible — local, enclosing, global. Misunderstanding it produces the classic unbound variable bugs.
Python Decorators
Decorators wrap functions to add behaviour without changing their code, like logging or caching. They are a professional-level tool you meet in real projects.
Python Lambda
Lambda functions are small anonymous functions written inline, ideal for one-off logic like sorting keys. Use them where a full def would be noise.
Python Recursion
Recursion is a function calling itself to break problems into smaller copies, from factorials to tree traversal. It trades elegance for careful base cases.
Python Generators
Generators produce values one at a time with yield instead of building a whole list. They keep memory tiny when processing huge or infinite sequences.
Python Range
range() generates sequences of numbers for loops without creating a list. It is the standard way to repeat code a fixed number of times.
Python Arrays
Python lists cover most needs, but the array module stores typed values compactly. It matters when memory and raw performance count.
Python Iterators
Iterators are objects you can loop over, and iter() and next() drive them manually. Understanding them explains how for loops really work.
Python Modules
Modules are files of reusable code you import into any program. The standard library is a toolbox of modules you already own.
Python Dates
The datetime module handles dates and times — creating, formatting and calculating them. Almost every business application stores timestamps.
Python Math
Python's math module provides square roots, trigonometry, logs and constants. It turns Python into a scientific calculator.
Python JSON
JSON is the data format of the web, and Python converts it to dictionaries and back with one line. Parsing JSON is a daily job for backend and data roles.
Python RegEx
Regular expressions search and extract patterns in text, from phone numbers to emails. They are dense but worth it — interviewers love them.
Python PIP
pip installs packages from PyPI, opening up thousands of libraries. Managing packages is a fundamental skill for any real Python project.
Python Try...Except
try and except catch runtime errors so your program can respond instead of crashing. Handling errors gracefully is what production code does.
Python String Formatting
Python offers several string formatting styles, with f-strings as the modern favourite. Formatting numbers and text well polishes every program.
Python None
None is Python's way of saying no value, and it appears everywhere — empty results, defaults, missing data. Learn to check for it safely.
Python User Input
input() reads what the user types, always returning a string. Converting and validating that input is where real programs begin.
Python VirtualEnv
Virtual environments isolate each project's packages so dependencies never clash. Every professional Python workflow starts with one.
Python Classes
10 of 10 topics publishedPython OOP
Object-oriented programming organises code into classes and objects that bundle data with behaviour. It is the dominant style in large Python systems.
Python Classes/Objects
Classes are blueprints and objects are instances created from them. This topic builds the mental model behind all of OOP.
Python __init__ Method
__init__ runs when an object is created, setting up its attributes. It is the constructor that every well-designed class defines.
Python self Parameter
self refers to the current object inside a class, linking methods to their data. It is the first parameter of every instance method.
Python Class Properties
Properties in classes control how attributes are read and written, adding validation without changing the interface. They make data access safe.
Python Class Methods
Class methods receive the class itself and build alternate constructors or shared state. They sit between instance methods and statics.
Python Inheritance
Inheritance lets a child class reuse and extend a parent's behaviour. It is how frameworks build hierarchies you plug into.
Python Polymorphism
Polymorphism lets different classes respond to the same method name in their own way. It is what makes code generic and interchangeable.
Python Encapsulation
Encapsulation hides internal details behind public methods, protecting data from misuse. It is the discipline that keeps large codebases maintainable.
Python Inner Classes
Inner classes are defined inside another class, useful for tightly related helpers. They are a niche pattern with specific use cases.
File Handling
4 of 4 topics publishedPython File Handling
File handling reads and writes files on disk — logs, CSVs, reports. The open() function and context managers make it safe and simple.
Python Read Files
Reading files gives you their contents as strings or lists of lines. Learn the modes and the with statement that prevents leaks.
Python Write/Create Files
Writing files creates or overwrites them, with append mode to add. Understanding each mode protects you from destroying data.
Python Delete Files
Deleting files uses the os module, and the same module checks existence first. Filesystem operations deserve a cautious hand.
Python Matplotlib
13 of 13 topics publishedMatplotlib Intro
Matplotlib is Python's original plotting library, turning data into charts. It is the foundation most data visualisation tools build on.
Matplotlib Get Started
Installing and importing matplotlib is the first step to your first chart. Learn the setup that every plotting project starts with.
Matplotlib Pyplot
pyplot is matplotlib's simple interface where a few lines produce a plot. It is the fast path from data to a chart on screen.
Matplotlib Plotting
plot() draws points and lines from x and y values, the simplest visualisation there is. Customising markers and styles follows naturally.
Matplotlib Markers
Markers style the points on a plot — circles, stars, crosses — making trends readable. They distinguish data series at a glance.
Matplotlib Line
Line styles and colours turn basic lines into clear comparisons between datasets. Small style choices carry the story of the data.
Matplotlib Labels
Labels, titles and gridlines tell viewers what a chart actually shows. A chart without labels is just decoration.
Matplotlib Grid
Gridlines add reference lines to a plot so values can be read precisely. They make professional-looking charts with one call.
Matplotlib Subplot
Subplots arrange multiple charts in one figure for side-by-side comparison. They are how dashboards show several metrics together.
Matplotlib Scatter
Scatter plots place individual points to reveal relationships between two variables. They are the classic first look at correlation.
Matplotlib Bars
Bar charts compare categories with vertical or horizontal bars. They are the most common chart in business reporting.
Matplotlib Histograms
Histograms show how values are distributed across ranges, revealing shape and outliers. They are essential for understanding any dataset.
Matplotlib Pie Charts
Pie charts show proportions of a whole as slices, though experts use them sparingly. Learn them — and when a bar chart works better.
Machine Learning
23 of 23 topics publishedGetting Started
This topic sets up the data science workflow in Python, from imports to data loading. A solid setup routine saves hours later.
Mean Median Mode
Mean, median and mode summarise the centre of a dataset in three different ways. They are the first statistics every analyst computes.
Standard Deviation
Standard deviation measures how spread out values are around the mean. It quantifies uncertainty and variation in one number.
Percentile
Percentiles tell you where a value stands in a distribution — the median is the 50th percentile. They power grades, rankings and benchmarks.
Data Distribution
Understanding how data is distributed guides every later decision, from models to visualisations. This topic introduces the distributions you will meet.
Normal Data Distribution
The normal distribution — the bell curve — describes countless natural datasets. It underpins much of statistics and machine learning.
Scatter Plot
Scatter plots in analysis reveal correlation, clusters and outliers between variables. They are your first visual tool for relationships.
Linear Regression
Linear regression fits a straight line through data to predict outcomes from one variable. It is the entry point to predictive modelling.
Polynomial Regression
Polynomial regression fits curves instead of straight lines when relationships bend. It extends linear regression to non-linear trends.
Multiple Regression
Multiple regression predicts an outcome from several variables at once. It is how real-world models account for many factors.
Scale
Scaling standardises features onto a common range so models compare them fairly. Without it, large numbers can dominate your model.
Train/Test
Splitting data into train and test sets lets you measure how a model performs on unseen data. It is the core discipline of machine learning.
Decision Tree
Decision trees split data on questions, forming a flowchart-like model that is easy to explain. They are both powerful and interpretable.
Confusion Matrix
The confusion matrix tabulates predictions against actuals, exposing where a classifier succeeds and fails. It is the honest scorecard of classification.
Hierarchical Clustering
Hierarchical clustering groups similar items into a tree of clusters. It reveals structure in data without needing a target column.
Logistic Regression
Logistic regression predicts probabilities for yes/no outcomes despite its name. It is the workhorse of binary classification.
Grid Search
Grid search tests combinations of hyperparameters to find the best model settings. It automates the tedious tuning loop.
Categorical Data
Categorical data — colours, cities, labels — needs special handling before models can use it. Encoding turns words into numbers.
K-means
K-means partitions data into k clusters by similarity, unsupervised. It is the most widely used clustering algorithm.
Bootstrap Aggregation
Bootstrap aggregation, or bagging, trains many models on resampled data and averages them. It is the idea behind Random Forest.
Cross Validation
Cross-validation rotates the data into different train/test folds so your score is reliable. It prevents fooling yourself with lucky splits.
AUC - ROC Curve
The ROC curve and its AUC score measure a classifier's ability to separate classes. It is the standard metric in many competitions.
K-nearest neighbors
K-nearest neighbours classifies a point by the labels of its closest neighbours. Simple, intuitive and surprisingly effective.
Python DSA
20 of 20 topics publishedPython DSA
Data structures and algorithms are the interview currency of software engineering, and Python makes them approachable. This section builds DSA intuition.
Lists and Arrays
Lists and arrays store ordered data, and understanding their costs decides how fast your programs run. This topic grounds DSA in Python's reality.
Stacks
Stacks follow last-in-first-out order, like a pile of plates, and they power undo features and expression evaluation. Push and pop are the whole story.
Queues
Queues are first-in-first-out structures like a ticket line, used in scheduling and message systems. Learn enqueue, dequeue and their uses.
Linked Lists
Linked lists chain nodes with pointers instead of using contiguous memory. They trade random access for cheap insertions and deletions.
Hash Tables
Hash tables map keys to values with near-instant lookups, the idea behind Python dictionaries. They are the fastest structure for membership.
Trees
Trees organise data in parent-child hierarchies, from file systems to organisation charts. They are the structure behind search and AI algorithms.
Binary Trees
Binary trees give each node up to two children, the foundation of expression evaluation and hierarchical storage. Traversal is the key skill.
Binary Search Trees
Binary search trees keep values ordered so lookups take logarithmic time. Balancing them keeps performance from degrading.
AVL Trees
AVL trees are self-balancing binary search trees that guarantee efficient operations. They show how structure design prevents worst cases.
Graphs
Graphs model networks — social, transport, dependency — as nodes and edges. They are the richest and most asked-about DSA topic.
Linear Search
Linear search checks each element in turn until it finds the target. Simple and honest, it is the baseline every other search beats.
Binary Search
Binary search halves the search space each step, finding items in sorted data at logarithmic speed. It is the interview favourite for a reason.
Bubble Sort
Bubble sort swaps neighbouring elements until the list is ordered, teaching the mechanics of sorting. Slow, but a perfect first algorithm.
Selection Sort
Selection sort repeatedly picks the smallest remaining element. Its fixed number of comparisons makes it a clean teaching example.
Insertion Sort
Insertion sort builds the sorted list one element at a time, the way you sort playing cards. It shines on small or nearly sorted data.
Quick Sort
Quick sort partitions around a pivot and recurses, averaging the fastest comparison sort. It is the default sort in many real libraries.
Counting Sort
Counting sort sorts by tallying values, running in linear time for small integer ranges. It shows that non-comparison sorts can break the usual limits.
Radix Sort
Radix sort orders numbers digit by digit using stable counting passes. It handles huge datasets where comparison sorts stall.
Merge Sort
Merge sort splits, sorts halves and merges them back, guaranteeing efficient order on every input. Its stability matters in real systems.
Python MySQL
12 of 12 topics publishedMySQL Get Started
This section shows Python working with MySQL, the classic combination for web backends. Connect, query and manage data from code.
MySQL Create Database
Creating a MySQL database from Python is the first backend task — a single command through the driver. It is the setup for everything after.
MySQL Create Table
Defining tables from Python mirrors SQL's CREATE TABLE with the driver's API. Schemas built in code travel with your project.
MySQL Insert
Inserting rows from Python binds application data into MySQL with parameterised queries. It is the write path of every CRUD app.
MySQL Select
Selecting from MySQL in Python returns rows you can loop through and transform. It is the read path behind dynamic pages.
MySQL Where
Adding WHERE filters to Python queries returns only matching rows, keeping transfers small. Parameter placeholders keep it secure.
MySQL Order By
Ordering results from Python lets the database sort before data arrives. It saves re-sorting large result sets in code.
MySQL Delete
Deleting rows through Python is the dangerous write operation, so filters are non-negotiable. The same caution as SQL applies in code.
MySQL Drop Table
Dropping tables from Python removes schemas programmatically during migrations and teardown. It is a deliberate, careful operation.
MySQL Update
Updating records from Python changes stored data with application logic. WHERE clauses protect the rows you did not mean to touch.
MySQL Limit
LIMIT in Python queries caps how many rows return, essential for pagination and previews. It keeps APIs fast on large tables.
MySQL Join
Joining tables from Python combines related data — orders with customers — before it reaches your code. The same join logic, driven from Python.
Python MongoDB
11 of 11 topics publishedMongoDB Get Started
Python with MongoDB pairs the language with a document database, no tables required. Learn the driver that stores dictionaries directly.
MongoDB Create DB
MongoDB creates databases and collections lazily on first use, unlike SQL. Understanding this model changes how you plan storage.
MongoDB Collection
Collections hold documents the way tables hold rows, but without a fixed schema. Each document can carry different fields.
MongoDB Insert
Inserting documents into MongoDB stores Python-style dictionaries directly. It is the friction-free write path of document databases.
MongoDB Find
find() queries MongoDB with filter dictionaries, returning matching documents. The syntax maps directly onto Python dicts.
MongoDB Query
Querying MongoDB builds filters with operators like $gt and $in. This query language is JSON-like and deeply composable.
MongoDB Sort
Sorting MongoDB results uses the sort() method with field and direction. It mirrors ORDER BY for document collections.
MongoDB Delete
Deleting documents in MongoDB uses delete_one and delete_many with filters. Precision matters just as much as in SQL.
MongoDB Drop Collection
Dropping a collection removes all its documents and structure at once. It is the document-database equivalent of DROP TABLE.
MongoDB Update
Updating MongoDB documents uses update_one and update_many with modifiers like $set. It evolves records without full rewrites.
MongoDB Limit
LIMIT in MongoDB queries caps returned documents for pagination and sampling. Small result sets keep applications responsive.
More Python Notes
109 topicsGenerative AI Engineer Roadmap 2026: How to Start a Career in GenAI
History of Python
Where Python came from — who created it, why it was named after Monty Python, and how it became the world's most popular language.
Variables and Data Types
Learn how Python variables work and explore its core data types — int, float, str, bool, list, tuple, set, and dict.
Operators in Python
Learn Python's arithmetic, comparison, logical, assignment, membership, and bitwise operators with practical examples.
If Else in Python
Master conditional logic in Python — if, elif, else, nested conditions, and the ternary expression.
Loops in Python
Master the for loop and while loop in Python, plus break, continue, and nested loops with practical examples.
Functions in Python
Learn how to define reusable blocks of code with def, parameters, return values, and default arguments.
List in Python
Understand Python lists — ordered, mutable collections — with indexing, slicing, and common list methods.
Tuple in Python
Learn about tuples — Python's immutable, ordered collections — and when to use them over lists.
Set in Python
Explore Python sets — unordered collections of unique items — and operations like union and intersection.
Dictionary in Python
Master Python dictionaries — key-value pairs for fast lookups — with methods to add, update, and access data.
OOPs in Python
Learn Object-Oriented Programming in Python — classes, objects, inheritance, encapsulation, and polymorphism.
File Handling in Python
Learn how to read, write, and manage files in Python using open(), read(), write(), and context managers.
Regex in Python
Master regular expressions in Python using the re module to search, match, and manipulate text patterns.
Exception Handling in Python
Learn how to handle errors gracefully in Python using try, except, finally, and custom exceptions.
Python Introduction
What Python is, why it is popular, and the kinds of problems it is used for.
Getting Started with Python
Installing Python and running your first program.
Python Statements
The building blocks of a Python program.
Python Indentation
Why whitespace matters and how blocks are defined without braces.
Type Casting
Converting between types with int(), float() and str().
String Formatting
The format() method and modern formatting options.
Python If
Running code when a condition is true.
The pass Statement
A placeholder that does nothing.
Python Match Case
Structural pattern matching introduced in modern Python.
The range() Function
Generating number sequences for loops.
Loop else
Running a block after a loop completes.
Break and Continue
Controlling loop execution.
Function Arguments
Passing values into functions.
*args and **kwargs
Accepting flexible positional and keyword arguments.
Lambda Functions
Small anonymous functions.
Virtual Environments
Isolating project dependencies.
Python Regular Expressions
Pattern matching with the re module.
Handling User Input
Reading input from the user.
Try...Finally
Running cleanup code no matter what.
Raise Exceptions
Throwing errors deliberately.
Read Files
Reading text and binary files.
Write and Create Files
Creating and saving files.
Delete Files
Removing files and folders.
Classes and Objects
Blueprints and the instances they create.
The __init__ Method
Setting up a new object.
The self Parameter
Referring to the current instance.
Class Properties
Attributes and the property decorator.
Class Methods
Methods bound to the class or instance.
Inner Classes
A class defined inside another class.
Array Methods
Adding, updating and removing array items.
NumPy Introduction
The foundation library for numerical computing.
Getting Started with NumPy
Installing and importing NumPy.
Creating Arrays
Building arrays from data.
Array Indexing
Selecting elements from arrays.
Array Slicing
Extracting ranges from arrays.
NumPy Data Types
The dtypes NumPy supports.
Copy vs View
How array data is shared or duplicated.
Array Shape and Reshape
Changing the dimensions of an array.
Iterating Arrays
Looping over array contents.
Joining and Splitting Arrays
Combining and breaking apart arrays.
Searching and Sorting Arrays
Finding and ordering values.
Filtering Arrays
Selecting elements by condition.
Random Numbers
Generating random data.
Universal Functions
Vectorised operations with ufuncs.
Pandas Introduction
The go-to library for tabular data.
Getting Started with Pandas
Installing and importing Pandas.
Series
One-dimensional labelled data.
DataFrames
Two-dimensional tables of data.
Reading CSV
Loading data from CSV files.
Reading JSON
Loading data from JSON.
Analyzing DataFrames
Inspecting and summarising data.
Cleaning Data
Fixing messy datasets.
Handling Empty Cells
Dealing with missing values.
Wrong Format and Wrong Data
Correcting types and outliers.
Removing Duplicates
Deduplicating rows.
Correlations
Measuring relationships between columns.
Matplotlib Introduction
The core plotting library for Python.
Pyplot
The simple plotting interface.
Plotting
Drawing your first line chart.
Customizing Plots
Colours, styles and line formats.
Markers
Point markers on plots.
Line Plots
Plotting continuous data.
Labels and Titles
Annotating axes and charts.
Grid
Adding reference lines.
Subplots
Multiple plots in one figure.
Scatter Plots
Plotting relationships between points.
Bar Charts
Comparing categories.
Histograms
Showing distributions.
Pie Charts
Displaying proportions.
Getting Started with Machine Learning
The workflow behind a machine learning project.
Mean, Median and Mode
Measures of central tendency.
Normal Distribution
The bell curve and why it matters.
Scaling Data
Normalising features.
Train and Test Sets
Splitting data to evaluate models.
Categorical Data Preprocessing
Encoding non-numeric features.
Introduction to DSA
Why data structures and algorithms matter.
Create Table
Defining tables programmatically.
Insert Data
Adding rows safely.
Select Query
Reading data back.
Where Clause
Filtering results.
Order By
Sorting query output.
Delete Records
Removing rows.
Drop Table
Deleting tables.
Update Records
Changing existing rows.
Limit Rows
Restricting result size.
Create Database
Creating a MongoDB database.
Create Collection
Making collections.
Insert Documents
Adding records.
Find Documents
Querying data.
Query Filters
Selecting documents by condition.
Sort
Ordering results.
Delete Documents
Removing records.
Drop Collection
Deleting a collection.
Update Documents
Modifying records.
Ready to go from notes to a real career?
Join Coding Now Tech Institute's Python course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.
Enroll Now — Free Demo AvailablePython Notes – FAQs
What students search before reading Python notes.