4. Introduction to basic Python constructionsΒΆ

This section contains an introduction to some basic programming concepts, and the basic Python constructions that implement them. It is intended primarily for those with no programming background, but there are fine points (such as the list comprehension section) which should be of help to any newcomer to Python.

What we know so far:

  1. Some types that can be data and contain data
  2. Some ways to put data in containers and take it out

What we can’t do yet:

  1. Branch: do different things depending on current conditions, including current data item;
  2. Do things over and over, as a way of computing complex things;
  3. Package things up into reusable code.

Contents