Python Loop Through Array And Object