Python

TotT: 2014

Python

"Python is a widely used general-purpose, high-level programming language. The language provides constructs intended to enable clear programs on both a small and large scale."
- Wikipedia

Major Attributes

  • Runtime interpretation
  • Dynamic, strong typing
  • First-class functions
  • Classical inheritence
  • Garbage collection
  • Rich literal types
  • Large standard library
  • White-space nesting

Use Cases

  • Scripting
  • Scientific computing
  • Backend web development
  • Glue

Example: Factorial

Example: Sine/Cosine

Example: Mammals

Example: Evens

Example: Names

Example: Cycle

Example: Multiply

Gotchas

  • White-space sensitivity
  • "Mature" standard library
  • Python 2 vs 3

Demo: Working with Python

Demo: Working with Python

Review

  • Language Features
  • Syntax
  • Types
  • Classes
  • Generators
  • Comprehensions
  • Gotchas