tools: Update build_api
tools: Update build_api

Rename loop varibles for better readability and
formatting changes.

kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed