Python 101
The fundamentals: variables, types, control flow, functions, then a tiny language model.
🌿 Normal
Python Basics
Your first steps: printing output, naming values, understanding types, and converting between them.
Operators & Expressions
Arithmetic, comparison, and boolean operators, the building blocks of every expression.
Control Flow
Make decisions with if/elif/else and repeat actions with for and while loops.
Functions
Package logic into reusable blocks with parameters, return values, and scope.
Strings Deep Dive
Master string methods, slicing, formatting, and encoding for real-world text processing.
Data Structures
Work with lists, tuples, dictionaries, and sets, Python's core containers.
File I/O
Read from and write to files, work with CSV data, and handle paths safely.
⚡ Hard
Loading a Text Corpus
Load, inspect, and understand the structure of a text corpus stored in CSV, the raw material for our tiny language model.
Tokenization & Word Frequency
Split raw text into tokens, count word frequencies, and build the vocabulary for our language model.
Bigram Probability Tables
Build and normalize bigram count tables that map each word to the words that follow it.
The generate_text() Function
Use random.choices to sample the next word from a bigram table and generate coherent text sequences.
CLI Text Generator & Temperature
Assemble all pieces into a command-line text generator and add a temperature parameter to control creativity.