https://medium.com/@deibyarizac/python-to-the-rescue-3-functions-that-will-simplify-your-life-10-10-0b044fcf7f5a