https://python.plainenglish.io/how-a-simple-python-script-solved-my-most-complex-problem-9f25ebd872bd