This repository is a structured collection of Python programs organized by topics. It serves as a hands-on reference for core Python concepts, from basic syntax to object-oriented programming.
Break.py
– Demonstrates use of thebreak
statementConditional Statements.py
– Coversif
,elif
, andelse
blocksLoops.py
– Examples offor
andwhile
loopsMatch.py
– Pattern matching introduced in Python 3.10+
Dictionaries.py
– Dictionary creation and operationsLists.py
– List operations and methodsSets.py
– Set properties and common methodsTuples.py
– Immutable tuples and their usagereadme.md
– Notes related to data structures
basics.py
– Defining and calling functionsdocstrings.py
– Using docstrings for documentationfunctions_scope.py
– Local and global scope examplesglobal.py
– Theglobal
keyword in depthlambda.py
– Anonymous lambda functionsmodules.py
– Importing and using modulesmymodules.py
– Custom module used in other scriptsrecursion.py
– Recursive function examples__pycache__
– Auto-generated Python cache folder
class.py
– Class and object basicsconstructor.py
– The__init__()
methodinheritance.py
– Inheritance and method overridinginstance.py
– Object instances and attributesoperator_overloading.py
– Customizing operators using special methods
fstrings.py
– Using f-strings for string formatting
- Python 3.10 or higher (for match statements)
- No external libraries required
Run any .py
file to explore the concept it covers. For example:
python Control\ Flow\ and\ Loops/Loops.py