Made the examples python 3 compatible.