Prerequisites
Python für den Programmiereinstieg 1 (PYFUN1) or equivalent knowledge
Course Content
1. Advanced Strings & Data Structures
- String formatting: f-strings, .format(), %
- String methods: split, join, replace, find, etc.
- Nested structures: lists of dicts, dicts of lists
- List, dict, and set comprehensions
- Conditional expressions
- Lambda functions with map, filter, reduce
2. File Handling
- Opening and reading files (open, read, readlines)
- Writing to files (write, writelines)
- Using with open(...) and context managers
- Handling encoding and file errors
- Working with JSON: json.load(), json.dump()
- Reading and writing CSV: csv.reader(), csv.DictWriter()
- Real-world examples: config files, data export
3. Iterators & Generators and decorators
- iter() and next()
- Generator functions using yield
- Generator expressions
- Custom iterable objects
- Functions as objects
- Writing decorators
- Use cases: logging, timing, access control
4. Object-Oriented Programming (OOP)
- Classes and objects
- Attributes and methods
- Inheritance and polymorphism
- Magic methods: __init__, __str__, etc.
5. Web Scraping
- Using requests to fetch web pages
- Parsing HTML with BeautifulSoup
- Extracting and cleaning data
- Handling errors and edge cases