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.
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 intolivehacking/
.Discussion: lookup runtime behavior of data structures (
list
vs.set
). Make a dedicated section in summary page.
Day 3¶
Modules and packages; https://www.youtube.com/watch?v=f26nAmfJggw
Demo hacking
livehacking/uniq-modularized/
Group exercise
group-exercise/
Links¶
https://www.youtube.com/watch?v=5qQQ3yzbKp8&lc=UghArKscoP9uTHgCoAEC