An object-oriented approach to creating a TKinter window

Tkinter window with label widget on Windows

The first Tkinter article showed how to create a simple window with a label. Here is the code: Grid was used as layout manager. After executing this code, this window appears: This simple app could now be further developed by adding more widgets. However, the more components are added, the more confusing the code becomes. … Read more

Introduction to Tkinter

Programming applications for the desktop is not a focus for me these days. Nevertheless, I have not lost interest in it. So every now and then I take a look at different programming languages ​​that can be used to implement this. This includes Python and Tkinter. In this blog post I would like to show … Read more

Formatting Python code using black

As a beginner in a programming language, you will hardly deal with the topic of code formatting. However, the more the project grows and 100 lines of code become 1000, you should think about formatting your code. The same applies when several programmers work on the same project. Each of them may use a different … Read more

Binary Search

The second algorithm that I would like to introduce here is also a search algorithm, the binary search. The following example is about searching for a value in a list. To use binary search, it is necessary to first sort this list. The sort() method can be used for this: Next, you need to find … Read more

Linear Search in Python

The linear search is the simplest approach to search for an element in a data set. This search algorithm iterates over all elements – from the beginning to the end – of a list until the element searched for is found. The result in the following example is the index of the value found. This … Read more