Python Basics (28.9.2020 - 30.9.2020)

Preparation

Workspace Setup

Github for Exercises

Please create Github accounts and send them to training@faschingbauer.co.at. We will do exercises via a private repository on Github. (See the privacy statement.)

Agenda

This is a preliminary list of topics. Audience is three persons from a homogeneous team - chances are that we will deviate as much as we can.

  • Variables and Types

    • Numerical types such as integer, floating point, boolean

    • Sequential types such as list, tuple, string

    • Indexing, slicing and other operations on sequential types

    • Associative types such as dictionaries and sets

    • Mutable versus immutable

  • Control Flow

    • if

    • while

    • for: more about iteration

  • Functions

    • Why and how

    • Parameters passing: positional versus keyword parameters, default parameters

    • Return values

  • Exception Handling

    • The exception hierarchy in the standard library

    • How to define custom exception classes

    • Raising exceptions, and reacting on them

  • Strings — Advanced Features

    • String methods

    • Formatting

    • Encoding: what it is, and how Python solves encoding problems

  • File I/O

    • Opening and/or creating files

    • Reading and writing

Log

Day 1

Day 2

  • Datastructures: list, dict`, set

  • Functions, parameter passing

  • Generators

  • Exercises: exercise4/joerg/uniq.py, exercise4/joerg/uniq-yield.py. Fill in comments, move into livehacking/.

    • Discussion: lookup runtime behavior of data structures (list vs. set). Make a dedicated section in summary page.

Day 3