References#
🏛️ Lecture 3
ENPM605 — L3: Python Fundamentals — Part II
Covers loops (for, while), the range() function, iterables, in-place vs out-of-place operations, lists and list comprehensions, tuples and unpacking, dictionaries, and sets with mathematical operations.
🐍 Python Language References
Tutorial — Control Flow
for loops, iteration over sequences, and the range() function.
Standard Library — range
Complete reference for range() objects and their properties.
Tutorial — Data Structures
List methods, list comprehensions, and common operations.
Tutorial — Data Structures
Tuple creation, unpacking, and use cases.
Tutorial — Data Structures
Dictionary creation, access patterns, and iteration.
Tutorial — Data Structures
Set operations, methods, and use cases.
Standard Library — Sequences
Complete reference for list, tuple, and range types.
Standard Library — dict
Complete reference for dictionary methods and operations.
Standard Library — set
Complete reference for set and frozenset operations.
Standard Library — copy
Shallow and deep copy operations for compound objects.
📏 Style and Best Practices
Coding Conventions
Guidelines for loops, comprehensions, and collection usage.
Dictionary Comprehensions
The PEP that introduced dictionary comprehension syntax.
Extended Iterable Unpacking
The PEP that introduced *rest syntax for unpacking.
📚 Recommended Reading
Getting Started
Sections 4 (control flow) and 5 (data structures) cover this lecture’s topics.
Learning Python (5th Edition)
Chapters 8–14 cover iteration, lists, dictionaries, tuples, and comprehensions in depth.
Fluent Python (2nd Edition)
Part II covers sequences, dictionaries, sets, and their protocols. Excellent for understanding Python’s data model.
Effective Python (2nd Edition)
Items 11–18 cover comprehensions, generators, and iteration best practices.