Python Create Object From Variable Cost