Update example.py

Changed as per recommendation.