Skip to main content
2 of 5
added 719 characters in body
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

#Octave, 215 bytes

fprintf('%s: %s\n',[num2cell(65:90);strsplit('Alfa Bravo Charlie Delta Echo Foxtrot Golf Hotel India Juliet Kilo Lima Mike November Oscar Papa Quebec Romeo Sierra Tango Uniform Victor Whiskey Xray Yankee Zulu')]{:})

If I got rid of the spaces, I'd save 25 bytes, but then I'd have to use a regex. The regex itself would cost quite a few bytes, and it would also remove the capital letter of all words, leaving me with the words lfa, ravo etc. I would therefore have to concatenate the new strings with the leading characters. All this costs bytes.

Explanation:

fprintf('%s: %s\n',      % Print a string with the format "str: str\n"
num2cell(65:90)          % Create a cell array with the numbers 65 - 90, one in each cell
strsplit('Alfa ...       % Split the string on the default delimiter: space
[num2cell();strsplit()]  % Concatenate cell arrays, leaving us with
                         % {'A',    'B'
                         %  'Alfa', 'Bravo'}
[...]{:}                 % Convert the cell array to a comma-delimited vector
                         % 'A', 'Alfa', 'B', 'Bravo' ...
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295