Tweak python code

moved comments, store pulled avg temp to a var.