>>> replace each letter in 'AB' with the corresponding NATO Phonetic alphabet code

- elapsed 0.420 seconds -
return ''.join([phonetic_table.get((word[i],), word[i]) for i in range(len(
    word))])
print(translate('AB'))

