A small description of how to approach dynamic programming and greedy algorithms using python. This is part of a series of talk Unibg Seclab (seclab.unibg.it) gave at Università degli Studi di Bergamo (Italy) in preparation for the Google Hash Code 2017.