Python Tutorial #8: Modules, Packages, and Virtual Environments

In the previous tutorial, we mastered strings and regular expressions. Now let’s learn how to organize your code into modules and packages, and how to manage dependencies with virtual environments. This is where Python goes from writing scripts to building real projects. By the end of this tutorial, you will know how to import code, structure a project, install packages, and use modern tools like pyproject.toml and uv. What Is a Module? A module is simply a Python file. When you create a file called math_utils.py, you create a module called math_utils. ...

April 26, 2026 · 9 min

Python Tutorial #7: Strings — Methods, Formatting, and Regex Basics

In the previous tutorial, we learned about lists, dictionaries, sets, and tuples. Now let’s take a deep dive into strings — one of the most used data types in Python. We covered string basics in Tutorial #3. This tutorial goes further: advanced methods, formatting tricks, raw strings, and regular expressions. String Methods Strings have many built-in methods. Here are the most useful ones for daily work. Cleaning Text text = " Hello, World! " print(text.strip()) # "Hello, World!" — remove whitespace from both sides print(text.lstrip()) # "Hello, World! " — left side only print(text.rstrip()) # " Hello, World!" — right side only print(text.lower()) # " hello, world! " print(text.upper()) # " HELLO, WORLD! " A common pattern: strip whitespace and normalize case: ...

April 25, 2026 · 9 min

Python Tutorial #6: Data Structures — Lists, Dicts, Sets, Tuples

In the previous tutorial, we learned about functions. Now let’s learn about Python’s built-in data structures: lists, dictionaries, sets, and tuples. These are the tools you use every day in Python. By the end of this tutorial, you will know how to store, access, and transform collections of data. Lists A list is an ordered, mutable collection. You can add, remove, and change items. fruits = ["apple", "banana", "cherry"] print(fruits[0]) # apple — first item print(fruits[-1]) # cherry — last item print(len(fruits)) # 3 Adding Items fruits.append("date") # Add to end: ["apple", "banana", "cherry", "date"] fruits.insert(1, "avocado") # Insert at index 1: ["apple", "avocado", "banana", ...] fruits.extend(["fig", "grape"]) # Add multiple items to end Removing Items fruits.remove("banana") # Remove by value (first occurrence) last = fruits.pop() # Remove and return last item item = fruits.pop(0) # Remove and return item at index 0 List Slicing Slicing creates a new list from part of an existing list. The syntax is list[start:end:step]: ...

April 25, 2026 · 9 min

Python Tutorial #5: Functions — def, *args, **kwargs, and Lambdas

In the previous tutorial, we learned about control flow: if, for, while, and match/case. Now let’s learn about functions — reusable blocks of code. Functions are the foundation of clean code. They let you write a piece of logic once and use it many times. By the end of this tutorial, you will know how to define functions, use different parameter types, write lambda functions, and understand closures. Defining a Function Use the def keyword to create a function: ...

April 25, 2026 · 9 min

Python Tutorial #4: Control Flow — if, for, while, match

In the previous tutorial, we learned about variables, types, and f-strings. Now let’s learn how to make decisions and repeat actions in Python. Control flow statements let your program choose what to do based on conditions and repeat actions in loops. By the end of this tutorial, you will know how to use if, for, while, match/case, and several useful loop helpers. if, elif, else The if statement runs code only when a condition is true: ...

April 25, 2026 · 9 min

Python Tutorial #3: Variables, Types, and f-Strings

In the previous tutorial, we installed Python and wrote our first program. Now let’s learn about the building blocks of every Python program: variables and types. By the end of this tutorial, you will know how to create variables, work with different data types, format strings with f-strings, and convert between types. Variables in Python A variable stores a value. In Python, you create a variable by assigning a value with =: ...

April 24, 2026 · 9 min

Python Tutorial #2: Installing Python and Your First Program

In the previous tutorial, we learned what Python is and why it is worth learning. Now it is time to install it and write your first program. By the end of this tutorial, you will have Python running on your computer. You will know how to use the Python REPL, write a script, and run it from the terminal. Installing Python Python works on macOS, Linux, and Windows. Let me show you how to install it on each system. ...

April 24, 2026 · 9 min

Python Tutorial #1: Why Python? A Simple Guide for Developers

Python is the most popular programming language in the world right now. It has been the number one language on the TIOBE Index since 2021 and holds a record-breaking 26% rating in 2025-2026. But why? What makes Python so popular? And should you learn it? In this tutorial, we will answer these questions. By the end, you will understand what Python is, where it is used, and why it is worth learning in 2026. ...

April 24, 2026 · 9 min

10 Python Concepts Every Developer Must Know

These ten concepts appear in almost every Python project. If you know all of them, you can read and write real Python code. If you are missing one, that is the one that trips you up on every project. 1. Variables and Data Types Python infers types automatically. No declaration needed. name: str = "Alex" age: int = 25 score: float = 9.5 active: bool = True nothing = None print(type(name)) # <class 'str'> The four built-in collection types: numbers = [1, 2, 3] # list — ordered, mutable point = (10, 20) # tuple — ordered, immutable tags = {"python", "dev"} # set — unique items user = {"name": "Alex", "age": 25} # dict — key/value pairs Use type() to check the type of any variable at runtime. Use type hints for documentation and IDE support. ...

April 14, 2026 · 5 min

KMP Tutorial #3: Understanding KMP Project Structure — Source Sets, Dependencies, and expect/actual

In the previous tutorial, we created a KMP project and ran it on Android and iOS. Now let’s understand exactly how that project is organized — because once you understand the structure, everything else in KMP makes sense. This is the tutorial that separates developers who struggle with KMP from those who build confidently. Take your time. The Core Idea: Source Sets A KMP project is organized into source sets. Each source set is a collection of Kotlin files that compile to specific platforms. ...

April 1, 2026 · 12 min