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.
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
Enjoying this page? We offer live Python training courses covering the content of this site.
Upcoming online Courses
17 Oct 2022 to 21 Oct 2022
17 Oct 2022 to 21 Oct 2022
17 Oct 2022 to 21 Oct 2022
19 Oct 2022 to 21 Oct 2022
In this chapter
|1. History and Philosophy of Python||A brief History of Python, the origin of the name and the underlying philosophy.|
|2. The Interpreter, an Interactive Shell||Introduction to the interactive mode of Python and its interactive Shell|
|3. Execute a Script||This 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 Indentation||Python uses indentation instead of braces to structure its programs and scripts into blocks.|
|5. Assignment Expressions||Tutorial on the new assignment expression also known as the walrus operator.|
|6. Data Types and Variables||Data Types and Variables in Python; defining and declaring variables|
|7. Type Annotations||A Chapter on Type Annotations introduced with Python 3.9, how can we use them and why are they useful|
|8. Operators||Detailled Introduction on Arithmetic and Comparison Operators in Python for Beginners|
|9. Sequential Data Types||This chapter of our online python 3 tutorial deals with Sequential Data Types: introduction into strings, lists and tuples with many examples.|
|10. List Manipulation||Python Tutorial: Changing and manipulating lists: removing elements with 'pop' and 'remove'. 'append' versus 'extend' and inserting elements in lists|
|11. Shallow and Deep Copy||Copy object and lists in Python. We explain how to avoid the pitfalls by introducing shallow and deep copy|
|12. Dictionaries||Tutorial on Dictionaries in Python: Operators and Methods of the Dictionary class|
|13. Sets and Frozen Sets||Even though sets have been used in Python since 2.3, Python3 has finally implemented them uniformly.|
|14. Sets Examples||File management in Python. Covering both reading and writing and serializing objects with the pickle and shelve modules|
|15. Keyboard Input||The input function in Python3. Differences to Python2 and raw_input|
|16. Conditional Statements||The chapter about conditional statements in our course on Python 3. Conditional statements are executed only if a condition is true|
|17. Structural Pattern Matching||The structural pattern matching behaves in its simplest form like the switch statement of C, C++, or Java.|
|18. While Loops||Chapter on loops with simple and practical examples using while loops in Python.|
|19. For Loops||Introduction into loops and the for Loop in Python. Simulating C-style loops with range|
|20. Output with Print||The print function of Python, usage and differences to Python version 2.x|
|21. Formatted Output||formatted output in three ways: the string methods ljust, rjust, center, format or using a C-style like formatting|
|22. Working with Dictionaries and while Loops||Python examples for dictionaries und while loops, using nested dictionaries.|
|23. Functions||Introduction to functions in Python with and without parameters. Functions with optional and an arbitrary number of parameters.|
|24. Passing Arguments||The passing of parameters and arguments in Python. Explaining the difference between call by object sharing, call by value and call by name.|
|25. Namespaces||Introduction into Namespaces and Scopes in Python|
|26. Global vs. Local Variables and Namespaces||Global versus local Variables, i.e. when and how to use global and local variables in Python namespaces.|
|27. File Management||File management in Python. Covering both reading and writing and serializingobjects with the pickle and shelve modules|
|28. Modular Programming and Modules||Modular Programming in Python by using modules and packages.|
|29. Packages||Relation between modules and packages. Introduction into creating Python packages.|
|30. Errors and Exception Handling||Introduction on Exception handling with try, except and finally|