🐍 Python Programs
105 Essential Programs from Beginner to Advanced
Your Progress
Filter by Category
Filter by Level
Hello World
#1Print Hello World
Print Name
#2Print user name
Add Two Numbers
#3Add two numbers
Swap Numbers
#4Swap two variables
Largest of Two
#5Find largest of two numbers
Even or Odd
#6Check even or odd
Factorial
#7Find factorial of number
Fibonacci
#8Print Fibonacci series
Reverse Number
#9Reverse digits of number
Prime Check
#10Check if number is prime
Palindrome String
#11Check palindrome string
Largest in List
#12Find largest element
Remove Duplicates
#13Remove duplicates from list
Count Vowels
#14Count vowels in string
Sum of Digits
#15Sum digits of a number
GCD
#16Find GCD of two numbers
Power
#17Power of a number
Leap Year
#18Check if year is leap year
Character Frequency
#19Count character frequency
Print Primes to N
#20Print primes up to N
Armstrong Number
#21Check Armstrong number
Palindrome Number
#22Check palindrome number
Count Digits
#23Count digits in number
Print 1 to N
#24Print numbers from 1 to N
Even Numbers 1-10
#25Print even numbers
Sum of First N
#26Sum of first N numbers
Multiplication Table
#27Print multiplication table
Largest of Three
#28Find largest of three numbers
Positive or Negative
#29Check positive or negative
Reverse String
#30Reverse a string
Sort List Ascending
#31Sort list in ascending order
Find LCM
#32Find LCM of two numbers
Second Largest
#33Find second largest element
Simple Calculator
#34Perform basic arithmetic
String Upper/Lower
#35Convert string case
Lambda Function
#36Use lambda expressions
Map & Filter
#37Use map and filter
List Comprehension
#38Build lists concisely
Dictionary Ops
#39Common dictionary operations
Default Args
#40Functions with default arguments
*args & **kwargs
#41Variable length arguments
Recursion
#42Recursive function example
Anagram Check
#43Check if two strings are anagrams
Word Frequency
#44Count word frequency
Find Non-Repeating
#45First unique character
String Compression
#46Compress repeating characters
Reverse Words
#47Reverse words in sentence
Flatten List
#48Flatten nested list
Merge Dicts
#49Merge two dictionaries
Stack with List
#50Stack using Python list
Queue with deque
#51Queue using collections.deque
Set Operations
#52Union, intersection, difference
Enumerate
#53Loop with index using enumerate
Zip & Unzip
#54Zip two lists together
Generator Function
#55Lazy sequence with yield
Decorator Basics
#56Function decorator pattern
Context Manager
#57Custom context manager with class
Class Basics
#58Define and use a class
Inheritance
#59Class inheritance example
Static Method
#60Static method inside class
Property Decorator
#61Getter / setter with property
Try / Except
#62Handle exceptions
File Write & Read
#63Write then read a file
CSV Reader
#64Read CSV with csv module
JSON Encode/Decode
#65Serialize and deserialize JSON
Regular Expression
#66Pattern matching with re
datetime Module
#67Work with dates and times
Random Module
#68Generate random numbers
OS Module
#69File system with os module
Sorted with Key
#70Custom sort using key function
Binary Search
#71Binary search on sorted list
Quick Sort
#72Quick sort implementation
Merge Sort
#73Merge sort implementation
Linked List
#74Singly linked list in Python
Stack Class
#75Stack using a class
Tree BFS
#76Breadth-first traversal
Graph DFS
#77Depth-first search on graph
Memoization
#78Cache results with functools
Singleton Pattern
#79Singleton using class
Observer Pattern
#80Event observer implementation
Iterator Protocol
#81Custom iterator class
Context Manager w/ yield
#82contextlib contextmanager
DataClass
#83Python dataclass decorator
Abstract Class
#84Abstract method with ABC
Thread Basics
#85Threading module usage
asyncio Basics
#86Async / await with asyncio
Multiprocessing
#87Process pool example
Type Hints
#88Python type annotations
Walrus Operator
#89Assignment expression :=
Structural Matching
#90match / case statement (3.10+)
Slots Optimization
#91Memory saving with __slots__
Profiling with cProfile
#92Profile performance
SQLite Integration
#93SQLite database with sqlite3
Requests HTTP
#94HTTP GET with requests library
FastAPI Hello
#95Minimal FastAPI app
Pandas DataFrame
#96Create and inspect a DataFrame
NumPy Array
#97Create and operate NumPy array
Matplotlib Plot
#98Simple line chart
Scikit-learn Model
#99Train a classifier
Unit Testing
#100unittest test case
Mock in Tests
#101Mock functions with unittest.mock
Logging Module
#102Log messages at different levels
Pathlib
#103Modern path handling
Enum Class
#104Define an enumeration
Metaprogramming
#105Metaclass basics
Your Python Journey
Track your progress through Python fundamentals and advanced concepts
