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

How to update a forked Github repository

It is not unusual for a number of forks to accumulate in your Github account. If you spend some time working on a fork, you will first want to update it, as the author of the original may have made changes in the meantime. This blog post describes how to do this in the shell. … 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

The structure of a Python project

‎A Python project may initially consist of only one or two files. In this case, you don’t have to worry about a project structure. But the situation is different if the program grows. In addition to the actual Python code files, documentation could also be added at some point. And as a rule, the tests … Read more