A small exercise in python