References#
🏛️ Lecture 2
ENPM605 — L2: Python Fundamentals — Part I
Covers packages and modules, indentation, Boolean type and truthiness, operators (arithmetic, relational, logical, membership, identity), numeric types and interning, strings (formatting, methods, indexing, slicing), and control flow.
🐍 Python Language References
Tutorial — Section 6
Modules, packages, __init__.py, and sys.path.
Language Reference — Import
Complete reference for Python’s import machinery.
Language Reference — Expressions
Complete reference for Python expressions and operator precedence.
Standard Library — Truth Value Testing
Rules for which objects are truthy and falsy.
Standard Library — str
Complete reference for all built-in string methods.
Format Specification Mini-Language
Detailed rules for f-string format specifiers.
Standard Library — Numeric Types
Reference for int, float, and complex operations.
Tutorial — Floating-Point Issues
Why 0.1 + 0.2 != 0.3 and how to handle it.
Tutorial — Section 4
if statements, for and while loops, and more.
📏 Style and Best Practices
Coding Conventions
Indentation (4 spaces), naming conventions, import ordering, and line length.
Multi-Line and Absolute/Relative Imports
The PEP that formalized Python’s import system conventions.
Literal String Interpolation
The PEP that introduced formatted string literals in Python 3.6.
📚 Recommended Reading
Getting Started
Sections 3 (informal introduction), 4 (control flow), and 5 (data structures).
Learning Python (5th Edition)
Chapters 4–7 cover core types: numbers, strings, lists, and dictionaries.
Fluent Python (2nd Edition)
Chapters 2 (sequences) and 4 (Unicode and bytes) provide advanced string and sequence coverage.
Effective Python (2nd Edition)
Items 1–10 cover Pythonic thinking including f-strings, slicing, and truthiness patterns.