Update class_exercise.py

add __getitem__  index operation