Skip to content

Latest commit

 

History

History
237 lines (199 loc) · 5.91 KB

File metadata and controls

237 lines (199 loc) · 5.91 KB

Python Learning Curriculum

Purpose

This repository is designed to help you learn Python through hands-on practice with personalized assignments generated by Claude. Work at your own pace, jump between topics as needed, and build a strong foundation in Python programming.

How It Works

  1. Create your own branch from main
  2. Copy the progress tracking template to track your learning journey
  3. Ask Claude for assignments based on where you are in the curriculum
  4. Complete assignments, commit your work, and request feedback
  5. Update your progress file as you complete each topic segment

Python Concepts Covered

1. Fundamentals

1.1 Getting Started

  • Installing Python and setting up your environment
  • Running Python scripts
  • Using the Python interactive shell (REPL)
  • Basic syntax and indentation rules

1.2 Variables and Data Types

  • Variables and assignment
  • Basic data types: int, float, str, bool
  • Type conversion and casting
  • Understanding None

1.3 Basic Operations

  • Arithmetic operators (+, -, *, /, //, %, **)
  • Comparison operators (==, !=, <, >, <=, >=)
  • Logical operators (and, or, not)
  • String operations and concatenation

2. Control Flow

2.1 Conditional Statements

  • if, elif, else statements
  • Nested conditionals
  • Ternary operator
  • Truthy and falsy values

2.2 Loops

  • while loops
  • for loops and the range() function
  • Loop control: break, continue, pass
  • Nested loops
  • Loop else clauses

3. Data Structures

3.1 Lists

  • Creating and accessing lists
  • List methods (append, extend, insert, remove, pop, etc.)
  • List slicing
  • List comprehensions
  • Nested lists

3.2 Tuples

  • Creating and using tuples
  • Tuple unpacking
  • Immutability of tuples
  • When to use tuples vs lists

3.3 Dictionaries

  • Creating and accessing dictionaries
  • Dictionary methods (keys, values, items, get, etc.)
  • Dictionary comprehensions
  • Nested dictionaries

3.4 Sets

  • Creating and using sets
  • Set operations (union, intersection, difference)
  • Set comprehensions
  • Frozen sets

4. Functions

4.1 Function Basics

  • Defining and calling functions
  • Parameters and arguments
  • Return values
  • Default parameters
  • Keyword arguments

4.2 Advanced Function Concepts

  • *args and **kwargs
  • Lambda functions
  • Scope and namespaces (local, global, nonlocal)
  • Recursive functions

5. Strings and Text Processing

5.1 String Manipulation

  • String methods (split, join, strip, replace, etc.)
  • String formatting (f-strings, format(), %-formatting)
  • String slicing and indexing
  • Raw strings and escape characters

5.2 Regular Expressions

  • Pattern matching basics
  • re module functions (search, match, findall, sub)
  • Common regex patterns
  • Groups and capturing

6. File Handling

6.1 File Operations

  • Opening and closing files
  • Reading files (read, readline, readlines)
  • Writing to files
  • File modes (r, w, a, r+, etc.)
  • Using context managers (with statement)

6.2 Working with Different File Types

  • Text files
  • CSV files
  • JSON files
  • Working with file paths (os.path, pathlib)

7. Error Handling

7.1 Exceptions

  • Understanding exceptions
  • try, except, else, finally blocks
  • Catching specific exceptions
  • Raising exceptions
  • Custom exceptions

8. Object-Oriented Programming (OOP)

8.1 Classes and Objects

  • Defining classes
  • Creating instances
  • Instance attributes and methods
  • The init method
  • The self parameter

8.2 OOP Principles

  • Encapsulation
  • Inheritance and super()
  • Polymorphism
  • Class methods and static methods
  • Property decorators

8.3 Special Methods

  • str and repr
  • len, getitem, setitem
  • Operator overloading
  • Context managers (enter, exit)

9. Modules and Packages

9.1 Using Modules

  • Importing modules
  • from...import statements
  • Module aliases
  • The name variable

9.2 Creating Modules and Packages

  • Creating your own modules
  • Package structure
  • init.py files
  • Relative vs absolute imports

10. Intermediate Concepts

10.1 Iterators and Generators

  • Understanding iterators
  • The iter() and next() functions
  • Creating generators with yield
  • Generator expressions

10.2 Decorators

  • Function decorators
  • Creating custom decorators
  • Decorators with arguments
  • Class decorators

10.3 Context Managers

  • Understanding context managers
  • Creating custom context managers
  • Using contextlib

11. Standard Library Highlights

11.1 Commonly Used Modules

  • datetime and time
  • collections (Counter, defaultdict, namedtuple, deque)
  • itertools
  • functools
  • math and random

11.2 System and OS Interaction

  • sys module
  • os module
  • subprocess
  • argparse for command-line arguments

12. Advanced Topics

12.1 List, Dict, and Set Advanced Techniques

  • Copying vs referencing
  • Deep copy vs shallow copy
  • ChainMap and other advanced collections

12.2 Functional Programming

  • map, filter, reduce
  • Partial functions
  • Higher-order functions

12.3 Type Hints and Annotations

  • Basic type hints
  • Optional and Union types
  • Type checking with mypy

13. Testing and Debugging

13.1 Testing

  • Writing unit tests with unittest
  • Using pytest
  • Test-driven development basics
  • Mocking and fixtures

13.2 Debugging

  • Using print debugging effectively
  • Python debugger (pdb)
  • Understanding tracebacks
  • Common debugging strategies

14. Working with External Libraries

14.1 Package Management

  • pip basics
  • requirements.txt
  • Virtual environments (venv)

14.2 Popular Libraries Introduction

  • requests (HTTP library)
  • pandas (data analysis)
  • numpy (numerical computing)
  • matplotlib (plotting)

Notes for Learners

  • This curriculum is designed to be flexible - you don't need to go in order
  • Some topics build on others, so check prerequisites
  • Return to difficult topics as many times as needed
  • Ask Claude to generate assignments at appropriate difficulty levels
  • Request additional practice on topics where you struggle