Python is a mature language that can do almost everything you can do in C / C ++ (even direct memory access if you really want to hurt yourself).
You will find that in a short time you can write beautiful code so that this code is read from the very beginning and that it remains readable (you will still know what it does, even after returning a year later).
The downside of Python is that your code will be somewhat slow. "Multiple," as in "may be too slow for certain occasions." So the usual approach is to write as much as possible in Python, because it will make your application convenient. In the end, you may run into speed issues. It’s time to consider rewriting part of your application in C.
The main advantages of this approach are:
- You already have a working application. Translating code from Python to C is much easier than writing from scratch.
- You already have a working application. After translating a small part of Python to C, you just need to check out this small part, and you can use the rest of the application (which has not changed) to do this.
- You do not pay the price in advance. If Python is fast enough for you, you will never have to perform additional optimizations.
- Python is much, much more powerful than C. Each Python line can do the same as 100 or even 1000 C lines.
source share