Elena' s AI Blog

Python Basics

Elena Daehnhardt

Midjourney AI-generated art
Image credit: Illustration created with Midjourney, prompt by the author.
Image prompt

“An illustration representing cloud computing”

Python Basics

This series is a practical path through Python fundamentals and applied workflows. It focuses on the skills that compound: clean scripting, reproducible experiments, and confidence in debugging and iteration.

Series Progress

6 of 12 posts published


All Posts in This Series

Part 1: Python Programming Language

Python is relatively easy to learn and beginner-friendly. I like Python because you can program any kind of project with it. It is open-source and free for anyone to use. Python has well-tested machine learning libraries and a very supportive community. I will overview herein a basic syntax of the Python programming language. This will be useful for beginners or people who move quickly from another programming language to Python.

Python Programming Language

Part 2: Python Functions: Writing Reusable Code

Functions are the building blocks of reusable Python code. In this post we cover def, parameters, return values, default arguments, *args, **kwargs, type hints, and lambda — all with birds.

Python Functions: Writing Reusable Code

Part 3: Python Error Handling: When Birds Misbehave

Things go wrong in every program. Python's exception system gives you the tools to handle errors gracefully, raise your own, and write code that fails helpfully rather than silently.

Python Error Handling: When Birds Misbehave

Part 4: Python's Standard Library: Your Built-in Toolkit

Python ships with a vast standard library — pathlib, datetime, json, random, dataclasses, and much more. Before you install anything, check what is already there.

Python's Standard Library: Your Built-in Toolkit

Part 5: Python classes and pigeons

Happy 1st of September, dear visitors. I have decided to write a letter to you. The letter concerns pigeons and Python classes, the essential OOP concepts such as inheritance, polymorphism, and encapsulation.

Python classes and pigeons

Part 6: Python Generators and Iterators: Lazy Birds

Generators let you work with sequences that are too large to fit in memory, or that do not exist yet. One yield at a time — exactly like migrating birds arriving one by one.

Python Generators and Iterators: Lazy Birds

Part 7: Spam detection with Python

Coming Soon

Build a practical spam classifier: load text files, preprocess with TF-IDF, validate with stratified CV, and export a reusable model artifact.

This post is currently being written and will be published soon.

Spam detection with Python

Part 8: GPU Acceleration for Machine Learning

Coming Soon

A hands-on guide to GPU-enabling ML workloads and verifying where acceleration actually improves end-to-end performance.

This post is currently being written and will be published soon.

GPU Acceleration for Machine Learning

Part 9: Cross-Validation Techniques in Machine Learning with Titanic Dataset

Coming Soon

Compare hold-out, k-fold, stratified, repeated, and nested CV with practical Titanic dataset examples in sklearn/TensorFlow.

This post is currently being written and will be published soon.

Cross-Validation Techniques in Machine Learning with Titanic Dataset

Part 10: Python Web App exposed with Ngrok

Coming Soon

A practical Flask + ngrok setup for testing webhooks and demos, with explicit security and lifecycle safeguards.

This post is currently being written and will be published soon.

Python Web App exposed with Ngrok

Part 11: Bard API in Python

Coming Soon

A practical Python API integration guide using resilient request patterns, response validation, and testable client abstractions.

This post is currently being written and will be published soon.

Bard API in Python

Part 12: Ridge Regression

Coming Soon

A practical Ridge Regression guide with feature scaling, hyperparameter tuning, and bias-variance interpretation.

This post is currently being written and will be published soon.

Ridge Regression

Getting Started

New to this series? Start with Part 1: Python Programming Language.

Each post builds on the previous one, so reading them in order is recommended. Each post also works on its own if you need to jump to a specific topic.

All Posts