Welcome to our awesome Python learning journey! This project is all about exploring some of the coolest and most powerful features in Python. Letβs dive in! π
Ever wondered how Python objects know what to do when you add them together or try to print them? Thatβs where dunder methods come in! Weβve got examples of:
__str__
- Making our objects print beautifully__len__
- Giving our objects a length__add__
- Teaching our objects math!Want to add superpowers to your functions without changing their code? Decorators are here to help! We explore:
Learn how to organize your Python code like a pro! We cover:
__init__.py
file and its powersA Streamlit web app that demonstrates our Python concepts in action:
python -m venv myvenv
source myvenv/bin/activate # On Windows: myvenv\Scripts\activate
pip install -r requirements.txt
streamlit run main.py
assignment-1/
β
βββ src/ # Source code directory
β βββ __init__.py # Makes src a package
β βββ dunder-magic-methods.py # Magic methods examples
β βββ decorators.py # Decorator patterns and examples
β βββ string-formatters.py # String formatting techniques
β βββ list-comprehension.py # List comprehension examples
β βββ keyword-args.py # Keyword arguments usage
β βββ positional-args.py # Positional arguments examples
β
βββ __init__.py # Root package initialization
βββ main.py # Streamlit app entry point
βββ requirements.txt # Project dependencies
Happy Coding! π