Some time ago I have started to learn Python. Today, I will present a way to solve the problem “Reduce file path”. The problem is the following – you are given a string and you should reduce it to a meaningful…