Python knowledge building step by step from the basics to the first desktop application
The aim of this book is to take the reader from the basic knowledge of computing essentials for programming in Python to a level of proficiency that will enable you to write a full-fledged desktop application with a graphical user interface. In a single book, the reader will get essentially the material of three books in a consistent structure: an introduction to the basic concepts and language building blocks, the application of the commonly used standard library modules, and the development of graphical user interfaces. The book starts from scratch, and the subsequent chapters build on each other. Therefore, it can be used as a textbook for beginners who want to learn computer programming and Python. Hence, it can be useful for high school, university, and course students or hobby programmers. This book is particularly recommended for those who wish to attend a Python course but for some reason (caring for a small child, limited mobility, distance, time constraints, etc.) cannot. The book can help in this situation because its content covers the knowledge that is provided in courses from beginner to advanced level, but it can be studied at the reader's own pace. As the presented body of knowledge is gradually deepening and leads to more and more subtle details of the language, this book is also recommended for teachers, engineers, software developers, data analysts, and data scientists. The book can also be used as a handbook. This means that if you have a task to solve or get stuck on a particular feature or detail of the language, and you remember that there was a section, diagram, table, or example in the book about it, you can go back and read it again. However, it is not a reference book in the sense that it is not a concise summary of the language. It is not intended to be a repetition or substitute for the official Python documentation; instead, it supplements it by providing more detailed descriptions of language features and showing the usage through examples or by giving explanations about the background of a particular language element. The primary goal of the book is to help you understand the principles and concepts, to gradually acquire knowledge of the language, and to develop the practical skills needed to create Python programs. In order to facilitate learning and retention of knowledge, along with numerous figures, diagrams, and tables, simple real-life analogies and metaphors are presented in several places in the text. These analogies mainly appear in passages that contain crucial principles or fundamental concepts that are particularly important for progression. As far as the content is concerned, in addition to some of the core principles of programming and software development, the reader is gradually introduced to important terms and language concepts such as object, container, iterator and generator, function and coroutine, function and class decorator, closure, class, abstract class, mixin class, data class, protocol, data and method attribute, method resolution order, property, attribute descriptor, single and multiple inheritance, module, package, polymorphism, static and dynamic typing, strong and weak typing, type hints, and static type checking. In addition to the basic language building blocks and structures, a number of frequently used modules of the standard library are presented in relation to a specific problem. Such sections are particularly useful for modules that may not be easily understood by everyone from the official documentation, such as the decimal module, which supports high precision mathematical calculations, and the tkinter module, which allows making a graphical user interface. This ebook covers the language features up to Python 3.13.