Intro to Python Tutorial

By Bernd Klein. Last modified: 01 Feb 2022.

This tutorial provides a comprehensive and in-depth introduction to the Python language. Python version 3, which is the latest and the correct one! It differs from other tutorials in that it provides many examples, exercises and many easy-to-understand charts and graphs. The course is aimed at both beginners and intermediate to experienced programmers or developers who are looking for differences to other programming languages.

A main focus in the creation of this tutorial is that the content is suitable for self-study.

Yes, Python is an easy to learn programming language, easier than many other programming languages. Still, many need a little extra help and explanation. In this introduction we offer this in a form that is both easy to understand, but also never loses sight of the necessary technical depth. The depth that especially experienced programmers are are looking for and are interested in. For newbies, it is also important that they learn the interrelationships and special features of Python right from the start.

Python 3 green and yellow

This online Python course was created and is maintained by Bernd Klein, an experienced Python trainer, giving training classes all over the world. Melisa Atay has been helping to maintain the website since the beginning of 2020. Among other things, she made sure that all pages now have syntax highlights in the code. We would like to take this opportunity to thank the numerous people who help us around the world. People who kindly point out discrepancies or submit suggestions for improvement. Thank you all very much!

Live Python training

instructor-led training course

Enjoying this page? We offer live Python training courses covering the content of this site.

See: Live Python courses overview

Upcoming online Courses

Python Basics for Beginners

29 Aug 2022 to 02 Sep 2022
17 Oct 2022 to 21 Oct 2022

Intensive Advanced Course

29 Aug 2022 to 02 Sep 2022
17 Oct 2022 to 21 Oct 2022

Python for Engineers and Scientists

29 Aug 2022 to 02 Sep 2022
17 Oct 2022 to 21 Oct 2022

Object Oriented Programming with Python

01 Jun 2022 to 03 Jun 2022
31 Aug 2022 to 02 Sep 2022
19 Oct 2022 to 21 Oct 2022

Enrol here

In this chapter

1. History and Philosophy of PythonA brief History of Python, the origin of the name and the underlying philosophy.
2. The Interpreter, an Interactive ShellIntroduction to the interactive mode of Python and its interactive Shell
3. Execute a ScriptThis chapter shows how to execute a Python script or program. The details of Python Byte Code and the Python virtual machine (PVM) are also illustrated.
4. Structuring with IndentationPython uses indentation instead of braces to structure its programs and scripts into blocks.
5. Assignment ExpressionsTutorial on the new assignment expression also known as the walrus operator.
6. Data Types and VariablesData Types and Variables in Python; defining and declaring variables
11. OperatorsDetailled Introduction on Arithmetic and Comparison Operators in Python for Beginners
12. Sequential Data TypesThis chapter of our online python 3 tutorial deals with Sequential Data Types: introduction into strings, lists and tuples with many examples.
14. List ManipulationPython Tutorial: Changing and manipulating lists: removing elements with 'pop' and 'remove'. 'append' versus 'extend' and inserting elements in lists
15. Shallow and Deep CopyCopy object and lists in Python. We explain how to avoid the pitfalls by introducing shallow and deep copy
16. DictionariesTutorial on Dictionaries in Python: Operators and Methods of the Dictionary class
18. Sets and Frozen SetsEven though sets have been used in Python since 2.3, Python3 has finally implemented them uniformly.
19. Sets ExamplesFile management in Python. Covering both reading and writing and serializing objects with the pickle and shelve modules
20. Keyboard InputThe input function in Python3. Differences to Python2 and raw_input
21. Conditional StatementsThe chapter about conditional statements in our course on Python 3. Conditional statements are executed only if a condition is true
22. Structural Pattern MatchingThe structural pattern matching behaves in its simplest form like the switch statement of C, C++, or Java.
24. While LoopsChapter on loops with simple and practical examples using while loops in Python.
25. For LoopsIntroduction into loops and the for Loop in Python. Simulating C-style loops with range
26. Output with PrintThe print function of Python, usage and differences to Python version 2.x
27. Formatted Outputformatted output in three ways: the string methods ljust, rjust, center, format or using a C-style like formatting
28. Working with Dictionaries and while LoopsPython examples for dictionaries und while loops, using nested dictionaries.
29. FunctionsIntroduction to functions in Python with and without parameters. Functions with optional and an arbitrary number of parameters.
30. Passing ArgumentsThe passing of parameters and arguments in Python. Explaining the difference between call by object sharing, call by value and call by name.
31. NamespacesIntroduction into Namespaces and Scopes in Python
32. Global vs. Local Variables and NamespacesGlobal versus local Variables, i.e. when and how to use global and local variables in Python namespaces.
33. File ManagementFile management in Python. Covering both reading and writing and serializingobjects with the pickle and shelve modules
34. Modular Programming and ModulesModular Programming in Python by using modules and packages.
35. PackagesRelation between modules and packages. Introduction into creating Python packages.
36. Errors and Exception HandlingIntroduction on Exception handling with try, except and finally