Skip to content

Day 01 – Part 1: Python Basics — Agenda

Python is the lingua franca of data science. Before you touch NumPy, Pandas, or any machine learning library, you need to own the language itself. This session builds that foundation — the part every experienced practitioner wishes they'd nailed from day one.


Session Overview

# Topic File Estimated Time
1 Python Introduction 01-python-introduction.md 20 min
2 Variables & Data Types 02-variables-and-data-types.md 30 min
3 Control Flow 03-control-flow.md 30 min
4 Functions 04-functions.md 30 min
5 Lists, Tuples & Dictionaries 05-lists-tuples-dictionaries.md 30 min
6 Practice Problems 06-practice-problems.md 45 min
7 Interview Questions 07-interview-questions.md 20 min
8 Cheat Sheet 08-cheat-sheet.md Reference

Total active learning time: ~3.5 hours (excluding breaks)


Learning Objectives

By the end of this session, you will be able to:

  • Explain what Python is, how it runs, and why it dominates data science
  • Declare variables correctly and understand Python's dynamic type system
  • Work confidently with all four core scalar types: int, float, str, bool
  • Write if/elif/else branches and for/while loops with real control logic
  • Use break, continue, enumerate(), zip(), and list comprehensions fluently
  • Define functions with positional, default, *args, and **kwargs parameters
  • Write docstrings and understand the LEGB scope rule
  • Manipulate lists, tuples, dictionaries, and sets for data processing tasks
  • Solve beginner-to-intermediate coding problems with clean, readable code

Setup Checklist

Before starting, confirm your environment is ready:

  • [ ] Python 3.10 or later installed — run python --version to check
  • [ ] VS Code with the Python extension, OR Jupyter Notebook, OR Google Colab
  • [ ] You can run print("hello") without errors

Tip

If you are completely new to Python, Google Colab requires zero installation — go to colab.research.google.com and start a new notebook. You can follow along without installing anything locally.


Difficulty & Time Estimates

Segment Difficulty Reading Time Exercise Time
Python Introduction Beginner 20 min
Variables & Data Types Beginner 25 min 10 min
Control Flow Beginner–Intermediate 25 min 15 min
Functions Intermediate 25 min 20 min
Lists, Tuples & Dictionaries Intermediate 30 min 20 min
Practice Problems Mixed 45 min

How to Use These Notes

Each file is self-contained but builds on the previous one. Work through them in order.

Every code block is executable as-is — copy it into a Python file or Jupyter cell and run it. The # Output: comments show exactly what you should see. If your output differs, that discrepancy is worth investigating before moving on.

The callout boxes throughout the notes follow this convention:

  • [!info] — background context and definitions
  • [!tip] — practical habits used by working data scientists
  • [!warning] — common mistakes that cause subtle bugs
  • [!success] — key takeaways worth remembering

05-lists-tuples-dictionaries | 01-python-introduction