Javascript Loop Through Array With Python