Python Language Intro (Part 2)

Agenda

  1. Language overview
  2. White space sensitivity
  3. Basic Types and Operations
  4. Statements & Control Structures
  5. Functions
  6. OOP (Classes, Methods, etc.)
  7. Immutable Sequence Types (Strings, Ranges, Tuples)
  8. Mutable data structures: Lists, Sets, Dictionaries

4. Statements & Control Structures

if-else statements

while loops

Exception Handling

for loops (iteration)

Generalized iteration (iter and next)

5. Functions

Functions as Objects

6. OOP (Classes, Methods, etc.)

Basic Class Example

Inheritance Example

7. Immutable Sequence Types: Strings, Ranges, Tuples

Recall: All immutable sequences support the common sequence operations. For many sequence types, there are constructors that allow us to create them from other sequence types.

Strings

Ranges

Tuples