Indicia - Introduction to Python
5-day intensive training course
Course aim
This 5-day Python course is designed for developers, engineers, and professionals with programming experience who want to become confident in reading, writing, and working with Python code. The course progresses from Python fundamentals through to advanced topics including HTTP communication, database access, and testing.
We start with environment setup, syntax, data types, and flow control, and progress through functions, object-oriented programming, error handling, modules, file handling, and modern Python practices. The course emphasizes hands-on learning with real-world scenarios and practical labs.
Each section is accompanied by slides, sample code, interactive labs, and complete solutions. As a live course, we can go deeper on topics of interest, whether or not they're explicitly on the syllabus.
Course materials
Labs are released in batches. Download the batch you need below; slides and code samples are added as they become available.
Labs (by batch)
- Labs 1–5 with solutions — Environment setup, Interactive input, Iteration and control, Containers, Dictionaries
- Labs 6–10 with solutions — Functions, Higher-order functions, Classes, Exceptions, Modules
- Labs 11–14 with solutions — Testing, Files, HTTP Endpoints, Database Access
Slides (by batch)
- Slides 1–5 — Days 1 and 2
- Slides 6–10 — Day 3 and 4
Code samples
Complete code written during the course (all 5 days).
- Final course code — All code from the 5-day course
Daily schedule
5-day intensive course:
- 09:30-11:00 — Session 1
- 11:00-11:20 — Break
- 11:20-12:45 — Session 2
- 12:45-13:45 — Lunch
- 13:45-15:10 — Session 3
- 15:10-15:30 — Break
- 15:30-16:30 — Session 4
Day 1: Python Fundamentals
Getting Started with Python
- Using the Interactive Interpreter (REPL)
- Setting up Python virtual environments
- Using an Integrated Development Environment (IDE)
- Python execution model
- Running programs
Python Language Fundamentals
- Overview of core Python syntax
- Identifiers and reserved words
- Data types and variables
-
Type conversion (
int(),float(),str()) - Arithmetic and assignment operations
- Strings, Numbers, and
None
input(), type conversion, and string
formatting.
Flow Control
-
if,elif,elsestatements - Comparison and logical operators
- Ternary expressions
whileloopsforloops-
break,continue, andelseclauses
Day 2: Data Structures and Collections
Data Containers
- Python collection types overview
- Tuples
- Lists
- Collection constructors
- Membership testing
- Iteration over collections
Advanced Data Containers
- Sets and FrozenSets
- Dictionaries
-
Dictionary operations (
.get(),.items(),.keys(),.values()) - List comprehensions
- Set and dictionary comprehensions
Day 3: Functions and Advanced Programming
Working with Functions
- Writing and calling functions
- Passing parameters
- Positional and keyword arguments
- Default parameter values
- Returning values
- Returning multiple values
- Function scope and namespaces
Higher-Order Functions
- Lambda functions
-
map(),filter(), andreduce() - Function composition
- Decorator syntax overview
Classes and Object-Oriented Programming
- Everything is an object in Python
- Class terminology
- Defining and instantiating classes
- Instance variables and methods
__init__and__str__methods- Classes and inheritance
- Method overriding
- Extending built-ins
- Accessors and mutators (
@property) - Composition vs. inheritance
Day 4: Error Handling, Modules, and File Operations
Exception Handling
- Errors and exceptions
-
try,except,finallyblocks - Raising exceptions
- Custom exceptions
- Exception hierarchies
Packages, Programs, and Modules
- Python architectural approaches
- Defining modules and packages
importstatements-
Module properties (
__name__,__file__) - The
if __name__ == "__main__"pattern - The Python Standard Library
- Using
pipto install packages requirements.txtfiles
File Handling
- Overview of file handling in Python
- Reading and writing text files
- Structured text files (CSV, JSON)
- Working with binary files
-
Streaming and serializing Python objects (
pickle,json) - Context managers (
withstatements)
Day 5: Testing, HTTP, and Database Access
Introduction to Testing
- Approaches to unit testing
- Test-driven development (TDD)
- Python testing tools (
pytest) - Writing tests
- Assertions
- Fixtures
- Parameterizing tests
- Testing for exceptions
Accessing HTTP Endpoints
- Implementing web services using Python
- Making HTTP requests (
requestslibrary) - Dealing with URL parameters
- Common data transfer structures (JSON)
- Handling HTTP errors and status codes
- Parsing API responses
Database Access
- Configuring database access
- Connecting to databases (SQLite)
- Making SQL requests
- Parameterized queries
- Handling data responses
- Transaction management
Lab structure and pedagogy
All labs follow a consistent structure:
- Objective — Clear learning goals for the lab
- Scenario — Real-world context for the exercise
- Tasks — Step-by-step tasks with "Your task", "Hints", and collapsible solution sections
This approach encourages you to think through problems before seeing solutions, learn by doing, check your work when needed, and build confidence through guided discovery.
What's included
- Labs — HTML format with collapsible solutions; real-world
scenarios; progressive difficulty; complete solutions in
labs-solutions/ - Slides — Decks per topic with code examples and visual explanations
- Sample code — Working, commented examples and multiple approaches
- Solutions — Tested solution files for all labs
Learning outcomes
By the end of the course you will be able to:
- ✅ Set up a professional Python development environment
- ✅ Write Python programs using core syntax and data types
- ✅ Use control flow structures effectively
- ✅ Work with collections (lists, tuples, sets, dictionaries)
- ✅ Write and use functions with various parameter types
- ✅ Create classes and use object-oriented programming
- ✅ Handle errors and exceptions gracefully
- ✅ Organize code into modules and packages
- ✅ Read and write files in various formats
- ✅ Write and run automated tests
- ✅ Make HTTP requests and work with APIs
- ✅ Connect to databases and execute queries
Prerequisites
- Programming experience in at least one other language
- Basic computer skills (file management, text editing)
- No prior Python knowledge required
Course delivery
- Format: Live, instructor-led training
- Hands-on: Extensive lab work with real-world scenarios
- Interactive: Questions and deeper dives encouraged
- Materials: All labs, slides, and solutions provided
Getting started
- Set up your environment — Follow Lab 1 to configure Python, virtual environments, and your IDE
- Work through labs sequentially — Each lab builds on previous concepts
- Try before looking — Attempt each task before checking the solution
- Experiment — Modify code and see what happens
- Ask questions — Use the interactive format to dive deeper into topics