Python Add Values To An Array Using Factors