python iterate list in reverse with index