What I am looking for is for a method in Python or any other way to solve this, for what I know there is one method, but I couldn\'t find it, in context what I am doing is c