Series
Python
Python fundamentals, tools, and data science implementations — virtual environments, packaging, matrix operations, and performance deep dives.
8 articles
- List vs Set in Python — Performance, Use CasesList vs Set in Python: iteration speed, O(1) membership testing, memory trade-offs, and exactly when to use each — with benchmark results.
- Sets Performance Better vs Lists — Why?Hash tables, O(1) average-case operations, and when sets dramatically outperform lists in Python.
- if __name__ == '__main__' in PythonThe __name__ variable, top-level code, and why guarding entry-point logic prevents unintended execution when a module is imported.
- Conda Virtual Environment & CommandsEssential conda commands: create, activate, install (conda + pip), deactivate, and delete environments — the Anaconda workflow.
- requirements.txt in PythonTwo commands every Python developer needs: pip freeze captures your environment, pip install -r recreates it anywhere.
- Python Virtual Environment — IntroductionWhy virtual environments exist, how virtualenv creates isolated Python environments, and the commands to use them on Linux and Windows.
- Convert Python Program to exePyInstaller and auto-py-to-exe — two ways to bundle Python apps into standalone executables users can run without Python installed.
- Python Matrix Multiplication — 3 MethodsNested loops, list comprehension, and NumPy.dot() — three ways to multiply matrices in Python with working code examples.