updating example,py
clean code