python training for loop class