Finding one’s way in life is not easy because there are so many paths we can take at any moment. Here is a way to look at it mathematically!
Even for simple tasks, it is often worth basing one’s work on existing solutions when it is an appropriate option… And such can be the case when writing Python scripts!
As part of a
course on the mathematics of Computer Science, I had to come up with algorithms to convert binary numbers to decimal numbers and vice versa.
If you ever wanted to automatically clean your Bash history file, here is a working solution written in Python that uses regular expressions to set any kind of pattern you might be looking for.