Perhaps the most definitive source for US securities exchanges, that appears to mostly match what you've provided as an example, is the output multicast output specification from the Consolidated Tape Association. This is the official report of all trades made.
Specially, this one:
Deep in the documentation there's a field called the TRF Identifier (Trade Reporting Facility) that is a single character.
As at revision 81 of this document (dated June 2 2017), you'll see the following TRF Identifiers:
A NYSE MKT
B NASDAQ OMX BX
J Bats EDGA
K Bats EDGX
P NYSE Arca
T NASDAQ OMX
X NASDAQ OMX PSX
Y Bats BYX
Z Bats BZX
In the end, different data providers will have different identifiers for exchanges, and it's not clear which you actually want to use.
ISO 10383 describes a standard that has a Market Identifier Code (4 character) that is used in the FIX protocol and various other places too. See:
Data feeds from vendors typically have their own conventions and quirks too. The merger-and-aquisition of exchanges has become commonplace so trying to identify an exchange is difficult.
eg. CME - did you mean CME, CBOT, NYMEX, COMEX, KCBOT or just CME? eg. InterContinental Exchange - did you mean IPE->ICE, NYBOT, WCE->ICE Futures Canada, or NYSE Euronext (which was NYSE, Archiplegao (Pacific Exchange), Euronext, AMEX -> NYSE Mkt -> Nyse Amercican)? There's probably a few more acquisitions along the way I've not mentioned too.