Updated example.py

Changed xrange to range and added a conversion to int in line 11