07
Sep
Advanced Python Programming Techniques
This course introduces advanced Python programming techniques that are useful for writing clearer, shorter, more efficient, and more maintainable code.
It is designed for practical scientific and technical programming rather than abstract computer science theory. The focus is on methods that improve everyday Python scripts, analysis workflows, and research-related programming tasks.
The course covers recursive functions and common runtime problems, including the use of memoization to avoid inefficient repeated calculations. Participants learn advanced function concepts such as flexible parameter passing with `*args` and `**kwargs`, decorators, lambda functions, and selected functional-style techniques including `map()`, `filter()`, `reduce()`, and comprehensions.
Functional programming concepts are introduced where they are practically useful. Participants learn not only how to use tools such as lambda functions and higher-order functions, but also the ideas behind them, including functions as objects and concise data transformation. These concepts are presented as workflow tools rather than as abstract theory.
The course also covers Pythonic data-processing patterns such as list comprehensions, custom sorting with `sort()` and `sorted()`, iterators, generators, and context managers. Practical examples include transforming data, simplifying repeated code, sorting structured results, processing large or streamed datasets, and handling files or resources safely.
By the end of the course, participants will be able to use selected advanced Python features confidently in practical programming tasks. They will understand how to improve existing scripts by making them more readable, reusable, efficient, and robust. They will also be able to recognize when recursive solutions may cause runtime problems, apply memoization, write flexible functions, use simple decorators, work with concise data transformations, and use iterators, generators, and context managers appropriately.
Learning goals
After completing the course, participants should be able to understand recursive functions, apply memoization, use `*args` and `**kwargs`, explain and write simple decorators, use lambda functions in focused contexts, understand selected functional-style concepts, apply `map()`, `filter()`, and `reduce()` where appropriate, write readable list comprehensions, sort data with custom criteria, distinguish iterators from generators, create memory-efficient generator-based workflows, and use context managers for safe resource handling. They should also be able to judge when an advanced Python feature improves code quality and when a simpler solution is preferable.
Didactic approach
The course follows a hands-on, example-driven approach. Topics are introduced step by step, starting from familiar Python concepts and extending them toward more powerful techniques. Short explanations are combined with live coding, guided examples, and practical exercises. Examples are drawn from realistic scientific and technical contexts, such as processing data collections, avoiding repeated computations, sorting results, simplifying analysis scripts, and handling files safely.
No advanced software engineering background is required. The course makes advanced-looking concepts accessible by connecting them directly to practical problems that PhD students in physics and related fields may encounter in their own scripts and workflows.
Participants deepen their Python knowledge beyond basic scripting and gain practical tools for improving code quality. The course is especially useful for researchers who already use Python and want to make their scripts more efficient, readable, reusable, and easier to maintain. It also helps reduce uncertainty around topics such as decorators, generators, memoization, functional-style programming, and context managers by presenting them as practical solutions to common scientific programming problems.
Participation Requirements
Participants should already have solid basic Python programming knowledge. They should be familiar with variables, data types, conditional statements, loops, functions, modules, and basic file handling.
Participation in the course “Python Programming for Beginners” or comparable prior experience is recommended. Participants should be comfortable writing and modifying Python functions and working with standard data structures such as lists, dictionaries, and strings. Prior attendance of an intermediate Python course is not strictly required, but some experience using Python for practical tasks is helpful.
This workshop is free of charge for registered members of the PIER Helmholtz Graduate School, its cooperation partners in the PIER Education Platform, and early career researchers from other Helmholtz centers. This course was made possible through course funding by the Helmholtz Information and Data Science Academy HIDA, which supported its development and implementation.
online / Zoom
7 + 8 September 2026, 9 am - 5 pm
Bernd Klein, Bodenseo
1.0
Doctoral researchers and postdocs
Slots are limited, early registration is strongly recommended.
Other interesting events
show all events30 Jun 2026
Thesis defense: Deniz Bozkurt
Thesis defense: Deniz Bozkurt | 30 June 2026, 2:30 p.m. |
The disputation is open to the UHH university public. Title of thesis: Breaking Symmetries: N = 2 Spin Chains and Conformal ...
01 Jul 2026
Thesis defense: Albert Bekov
Thesis defense: Albert Bekov | 1 July 2026, 11:00 a.m. |
The disputation is open to the UHH university public. Title of thesis: Higher-Point Correlation Functions in N = 4 Supersymm ...
03 Jul 2026
Thesis defense: Miguel Blanco García
Thesis defense: Miguel Blanco García | 3 July 2026, 10:00 a.m. |
The disputation is open to the UHH university public. Title of thesis: ADSORPTION AND PHOTOOXIDATION OF SARS-CoV 2 SPIKE AMI ...
03 Jul 2026
Thesis defense: Nele Naomi Striker
Thesis defense: Nele Naomi Striker | 3 July 2026, 10:30 a.m. |
The disputation is open to the UHH university public. Title of thesis: Spatial and Temporal Correlations in Colloidal System ...