Same example in python