From the python summer school in split