Find the best time to buy and sell stock with transaction fe using Dynamic Programming, implementation in Python.